public Disposable subscribe(DisposingExecutor queue, Callback<T> onReceive) { ChannelSubscription<T> subber = new ChannelSubscription<>(queue, onReceive); return subscribe(subber); }
/** * Receives the event and queues the execution on the target execute. */ @Override protected void onMessageOnProducerThread(final T msg) { Runnable asyncExec = new Runnable() { public void run() { _receiveMethod.onMessage(msg); } @Override public String toString() { return _receiveMethod.toString() + "(" + msg + ")"; } }; getQueue().execute(asyncExec); } }
/** * Receives the event and queues the execution on the target execute. */ @Override protected void onMessageOnProducerThread(final T msg) { Runnable asyncExec = new Runnable() { public void run() { _receiveMethod.onMessage(msg); } @Override public String toString() { return _receiveMethod.toString() + "(" + msg + ")"; } }; getQueue().execute(asyncExec); } }
public Disposable subscribe(DisposingExecutor queue, Callback<T> onReceive) { ChannelSubscription<T> subber = new ChannelSubscription<>(queue, onReceive); return subscribe(subber); }