public interface Data extends Sender<Exception>
An instance of this is bound to a topic and can be looked up by a call
to Application.data(Topic)
.
Modifier and Type | Method and Description |
---|---|
default void |
subscribe(MessageHandler handler)
Receive messages on this data topic
|
void |
subscribe(MessageHandler handler,
ErrorHandler<? extends Throwable> errorHandler)
Receive messages and handle reception errors on this data topic
|
default void subscribe(MessageHandler handler) throws Exception
Subscriptions will automatically be re-established after a connection loss.
handler
- the handler which should process received messagesException
- if anything goes wrong on the subscription processvoid subscribe(MessageHandler handler, ErrorHandler<? extends Throwable> errorHandler) throws Exception
Subscriptions will automatically be re-established after a connection loss.
handler
- the handler which should process received messageserrorHandler
- the handler which should process received messages which got received
but could not be properly parsedException
- if anything goes wrong on the subscription processCopyright © 2017. All rights reserved.