public class MqttApplication extends AbstractApplication
Application.Builder
applicationId, subscriptions, transport
Constructor and Description |
---|
MqttApplication(MqttClient client,
String applicationId,
Executor executor) |
Modifier and Type | Method and Description |
---|---|
AbstractData |
data(Topic topic)
Lookup a data controller to an application topic
|
protected void |
handleMessage(MessageHandler handler,
ByteBuffer buffer) |
protected CompletionStage<?> |
internalSubscribe(Topic topic,
MessageHandler handler,
ErrorHandler<? extends Throwable> errorHandler) |
protected void |
publish(Topic topic,
Payload payload) |
checkClosed, close, handleConnected, handleDisconnected, subscribe, transport
public MqttApplication(MqttClient client, String applicationId, Executor executor)
public AbstractData data(Topic topic)
Application
data
in interface Application
data
in class AbstractApplication
topic
- the topic the controller is bound to, must never be null
protected void publish(Topic topic, Payload payload) throws Exception
publish
in class AbstractApplication
Exception
protected CompletionStage<?> internalSubscribe(Topic topic, MessageHandler handler, ErrorHandler<? extends Throwable> errorHandler) throws Exception
internalSubscribe
in class AbstractApplication
Exception
protected void handleMessage(MessageHandler handler, ByteBuffer buffer) throws Exception
Exception
Copyright © 2017. All rights reserved.