public abstract class MqttClient extends AbstractClient
| Modifier and Type | Class and Description |
|---|---|
static class |
MqttClient.Builder<T extends MqttClient.Builder<T>> |
executor| Constructor and Description |
|---|
MqttClient(ScheduledExecutorService executor,
BinaryPayloadCodec codec,
MqttNamespace namespace,
String clientId,
Set<Module> modules) |
| Modifier and Type | Method and Description |
|---|---|
protected BinaryPayloadCodec |
getCodec() |
String |
getMqttClientId() |
protected AbstractApplication |
internalCreateApplication(Application.Builder builder,
String applicationId) |
protected void |
internalUnsubscribe(String applicationId,
Collection<Topic> topics) |
protected void |
publish(String applicationId,
Topic topic,
ByteBuffer buffer) |
abstract void |
publishMqtt(String topic,
ByteBuffer payload) |
protected CompletionStage<?> |
subscribe(String applicationId,
Topic topic,
MqttMessageHandler messageHandler) |
protected abstract CompletionStage<?> |
subscribeMqtt(String topic,
MqttMessageHandler messageHandler) |
protected abstract void |
unsubscribeMqtt(Set<String> mqttTopics) |
buildApplication, handleApplicationClosed, handleConnected, handleDisconnected, internalBuildApplication, internalCloseApplication, notifyAddApplication, notifyConnected, notifyDisconnected, notifyRemoveApplication, transportclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic MqttClient(ScheduledExecutorService executor, BinaryPayloadCodec codec, MqttNamespace namespace, String clientId, Set<Module> modules)
protected void publish(String applicationId, Topic topic, ByteBuffer buffer) throws Exception
Exceptionpublic abstract void publishMqtt(String topic, ByteBuffer payload) throws Exception
Exceptionprotected abstract CompletionStage<?> subscribeMqtt(String topic, MqttMessageHandler messageHandler) throws Exception
Exceptionprotected CompletionStage<?> subscribe(String applicationId, Topic topic, MqttMessageHandler messageHandler) throws Exception
Exceptionprotected void internalUnsubscribe(String applicationId, Collection<Topic> topics) throws Exception
internalUnsubscribe in class AbstractClientExceptionprotected abstract void unsubscribeMqtt(Set<String> mqttTopics) throws Exception
Exceptionpublic String getMqttClientId()
protected AbstractApplication internalCreateApplication(Application.Builder builder, String applicationId)
internalCreateApplication in class AbstractClientprotected BinaryPayloadCodec getCodec()
Copyright © 2017. All rights reserved.