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, transport
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public MqttClient(ScheduledExecutorService executor, BinaryPayloadCodec codec, MqttNamespace namespace, String clientId, Set<Module> modules)
protected void publish(String applicationId, Topic topic, ByteBuffer buffer) throws Exception
Exception
public abstract void publishMqtt(String topic, ByteBuffer payload) throws Exception
Exception
protected abstract CompletionStage<?> subscribeMqtt(String topic, MqttMessageHandler messageHandler) throws Exception
Exception
protected CompletionStage<?> subscribe(String applicationId, Topic topic, MqttMessageHandler messageHandler) throws Exception
Exception
protected void internalUnsubscribe(String applicationId, Collection<Topic> topics) throws Exception
internalUnsubscribe
in class AbstractClient
Exception
protected abstract void unsubscribeMqtt(Set<String> mqttTopics) throws Exception
Exception
public String getMqttClientId()
protected AbstractApplication internalCreateApplication(Application.Builder builder, String applicationId)
internalCreateApplication
in class AbstractClient
protected BinaryPayloadCodec getCodec()
Copyright © 2017. All rights reserved.