public class CompositeChannel<T> extends Object implements Channel<T>
Constructor and Description |
---|
CompositeChannel(Channel<T>... channels) |
Modifier and Type | Method and Description |
---|---|
void |
publish(T msg)
Publish a message.
|
Disposable |
subscribe(DisposingExecutor executor,
Callback<T> receive)
Subscribe to receive messages produced by this subscriber
|
Disposable |
subscribe(Subscribable<T> sub) |
public Disposable subscribe(DisposingExecutor executor, Callback<T> receive)
Subscriber
subscribe
in interface Subscriber<T>
executor
- DisposingExecutor
to use for invoking the callback upon message receipt.receive
- Callback
to invoke upon message receiptDisposable
that can be invoked to cancel this subscriptionpublic Disposable subscribe(Subscribable<T> sub)
subscribe
in interface Subscriber<T>
Copyright © 2017. All Rights Reserved.