/** * Emit a response that should be OnNexted to an Observer * @param response response to emit to initial command */ @Override public void emitResponse(T response) { if (!isTerminated()) { subject.onNext(response); valueSet.set(true); } else { throw new IllegalStateException("Response has already terminated so response can not be set : " + response); } }
/** * When set any client thread blocking on get() will immediately be unblocked and receive the single-valued response. * * @throws IllegalStateException * if called more than once or after setException. * @param response response to give to initial command */ @Override public void setResponse(T response) { if (!isTerminated()) { subject.onNext(response); valueSet.set(true); subject.onCompleted(); } else { throw new IllegalStateException("Response has already terminated so response can not be set : " + response); } }
/** * Provides the Observer with a new item to observe. * <p> * The {@link Observable} may call this method 0 or more times. * <p> * The {@code Observable} will not call this method again after it calls either {@link #onComplete} or * {@link #onError}. * * @param input the item emitted by the Observable */ public void onNext(String input) { subject.onNext(input); }
@Override protected void append(final LoggingEvent event) { if (closed) { return; } publishSubject.onNext(layout.format(event)); }
public void call() { rx.onNext(total.get()); rx.onCompleted(); } }
@PostInjector public void activate() { providerSubject.onNext(providers); } }
/** * Emit a response that should be OnNexted to an Observer * @param response response to emit to initial command */ @Override public void emitResponse(T response) { if (!isTerminated()) { subject.onNext(response); valueSet.set(true); } else { throw new IllegalStateException("Response has already terminated so response can not be set : " + response); } }
public void fulfill(R result) { subject.onNext(result); subject.onCompleted(); }
public void removeFromRegistry(InstanceInfo sample) { fullRegistrySubject.onNext(new ChangeNotification<InstanceInfo>(Kind.Delete, sample)); }
public void fulfill(T value) { this.subject.onNext(value); this.subject.onCompleted(); }
public void uploadToRegistry(InstanceInfo sample) { fullRegistrySubject.onNext(new ChangeNotification<InstanceInfo>(Kind.Add, sample)); }
ReplaySubject<Date> subject = ((MyApplication)getApplication()).getSubject(); subject.onNext(mDate); subject.onCompleted();
public void batchEndFor(InstanceInfo instanceInfo) { for (Entry<Interest, ReplaySubject<ChangeNotification<InstanceInfo>>> entry : notificationSubjects.entrySet()) { if (entry.getKey().matches(instanceInfo)) { entry.getValue().onNext(StreamStateNotification.bufferEndNotification(entry.getKey())); } } }
public void batchStartFor(InstanceInfo instanceInfo) { for (Entry<Interest, ReplaySubject<ChangeNotification<InstanceInfo>>> entry : notificationSubjects.entrySet()) { if (entry.getKey().matches(instanceInfo)) { entry.getValue().onNext(StreamStateNotification.bufferStartNotification(entry.getKey())); } } }
public SD<R> Yield(ISupply<R> exp) { return (label, rho, sigma, brk, contin, err) -> { get(exp).accept(v -> { result.onNext(v); sigma.call(); } , err); }; }
@Override public Observable<Void> writeAndFlush(O msg) { checkIfClosed(); connectionOutputSubject.onNext(msg); return Observable.empty(); }
public void batchEnd(Interest<InstanceInfo> interest) { getInterestSubject(interest).onNext(StreamStateNotification.bufferEndNotification(interest)); }
private Example_9_ViewModel_Step3 createStep3ViewModel(String name, String firstname) { vm2v_status.vm2v_status.onNext("Thanks"); Example_9_ViewModel_Step3 viewModelStep3 = new Example_9_ViewModel_Step3(); viewModelStep3.vm_name.onNext(name); viewModelStep3.vm_firstname.onNext(firstname); viewModelStep3.v2vm_restartButtonEvents.subscribe(actionEvent -> { vm2v_mainPanel.onNext(createStep2ViewModel()); }); return viewModelStep3; }
public void uploadBatchToRegistry(Interest<InstanceInfo> interest, InstanceInfo sample) { batchStart(interest); fullRegistrySubject.onNext(new ChangeNotification<InstanceInfo>(Kind.Add, sample)); batchEnd(interest); }
@Override public void onNext(ChangeNotification<InstanceInfo> notification) { if (notification.isDataNotification() && interest.matches(notification.getData())) { finalSubject.onNext(notification); } } });