@Override public Observable<Void> call() throws Exception { return delegate.register(instanceInfo); } });
@Override public Observable<Void> call(RegistrationChannel channel, InstanceInfo instanceInfo) { return channel.register(instanceInfo); } };
@Override public Observable<Void> call() throws Exception { return delegate.register(instanceInfo); }
@Override public Observable<Void> register(InstanceInfo instanceInfo) { operations.add(instanceInfo); return delegate.register(instanceInfo); }
@Override protected Observable<Void> repopulate(StateWithChannel newState) { if (instanceInfo != null) { return newState.getChannel().register(instanceInfo); } return Observable.empty(); }
@Override public Observable<Void> register(final InstanceInfo newInfo) { this.instanceInfo = newInfo; return getStateWithChannel().getChannel().register(instanceInfo); }
@Override public Observable<Void> register(InstanceInfo instanceInfo) { if (shutdown) { return Observable.error(new IllegalStateException("Registration handler is already shutdown.")); } final RegistrationChannel newChannel = channelFactory.newRegistrationChannel(); final RegistrationChannel existing = instanceIdVsChannel.putIfAbsent(instanceInfo.getId(), newChannel); if (null != existing) { return existing.update(instanceInfo); // Be more acceptable to failure in contract adherence from the user. // If it is the same instance as existing, the server should not // generate unnecessary notifications. } return newChannel.register(instanceInfo); }