Modifier and Type | Field and Description |
---|---|
static TypeArg<MqttEndpoint> |
__TYPE_ARG |
Constructor and Description |
---|
MqttEndpoint(MqttEndpoint delegate) |
Modifier and Type | Method and Description |
---|---|
MqttEndpoint |
accept(boolean sessionPresent)
Sends the CONNACK message to the remote MQTT client with "connection accepted"
return code.
|
MqttAuth |
auth() |
MqttEndpoint |
autoKeepAlive(boolean isAutoKeepAlive)
Enable/disable auto keep alive (sending ping response)
|
String |
clientIdentifier() |
void |
close()
Close the endpoint, so the connection with remote MQTT client
|
MqttEndpoint |
closeHandler(Handler<Void> handler)
Set a close handler.
|
MqttEndpoint |
disconnectHandler(Handler<Void> handler)
Set a disconnect handler on the MQTT endpoint.
|
MqttEndpoint |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler.
|
MqttEndpoint |
getDelegate() |
boolean |
isAutoKeepAlive() |
boolean |
isCleanSession() |
boolean |
isConnected() |
boolean |
isPublishAutoAck() |
boolean |
isSubscriptionAutoAck() |
int |
keepAliveTimeSeconds() |
int |
lastMessageId() |
static MqttEndpoint |
newInstance(MqttEndpoint arg) |
MqttEndpoint |
pingHandler(Handler<Void> handler)
Set the pingreq handler on the MQTT endpoint.
|
MqttEndpoint |
pong()
Sends the PINGRESP message to the remote MQTT client
|
String |
protocolName() |
int |
protocolVersion() |
MqttEndpoint |
publish(String topic,
Buffer payload,
MqttQoS qosLevel,
boolean isDup,
boolean isRetain)
Sends the PUBLISH message to the remote MQTT client
|
MqttEndpoint |
publishAcknowledge(int publishMessageId)
Sends the PUBACK message to the remote MQTT client
|
MqttEndpoint |
publishAcknowledgeHandler(Handler<Integer> handler)
Set the puback handler on the MQTT endpoint.
|
MqttEndpoint |
publishAutoAck(boolean isPublishAutoAck)
Enable/disable publishing (in/out) auto acknowledge
|
MqttEndpoint |
publishComplete(int publishMessageId)
Sends the PUBCOMP message to the remote MQTT client
|
MqttEndpoint |
publishCompleteHandler(Handler<Integer> handler)
Set the pubcomp handler on the MQTT endpoint.
|
MqttEndpoint |
publishHandler(Handler<MqttPublishMessage> handler)
Set the publish handler on the MQTT endpoint.
|
MqttEndpoint |
publishReceived(int publishMessageId)
Sends the PUBREC message to the remote MQTT client
|
MqttEndpoint |
publishReceivedHandler(Handler<Integer> handler)
Set the pubrec handler on the MQTT endpoint.
|
MqttEndpoint |
publishRelease(int publishMessageId)
Sends the PUBREL message to the remote MQTT client
|
MqttEndpoint |
publishReleaseHandler(Handler<Integer> handler)
Set the pubrel handler on the MQTT endpoint.
|
MqttEndpoint |
reject(MqttConnectReturnCode returnCode)
Sends the CONNACK message to the remote MQTT client rejecting the connection
request with specified return code.
|
MqttEndpoint |
setClientIdentifier(String clientIdentifier)
Set client identifier if not provided by the remote MQTT client (zero-bytes)
|
MqttEndpoint |
subscribeAcknowledge(int subscribeMessageId,
List<MqttQoS> grantedQoSLevels)
Sends the SUBACK message to the remote MQTT client
|
MqttEndpoint |
subscribeHandler(Handler<MqttSubscribeMessage> handler)
Set a subscribe handler on the MQTT endpoint.
|
void |
subscriptionAutoAck(boolean isSubscriptionAutoAck)
Enable/disable subscription/unsubscription requests auto acknowledge
|
MqttEndpoint |
unsubscribeAcknowledge(int unsubscribeMessageId)
Sends the UNSUBACK message to the remote MQTT client
|
MqttEndpoint |
unsubscribeHandler(Handler<MqttUnsubscribeMessage> handler)
Set a unsubscribe handler on the MQTT endpoint.
|
MqttWill |
will() |
public static final TypeArg<MqttEndpoint> __TYPE_ARG
public MqttEndpoint(MqttEndpoint delegate)
public MqttEndpoint getDelegate()
public void close()
public String clientIdentifier()
public MqttAuth auth()
public MqttWill will()
public int protocolVersion()
public String protocolName()
public boolean isCleanSession()
public int keepAliveTimeSeconds()
public int lastMessageId()
public void subscriptionAutoAck(boolean isSubscriptionAutoAck)
isSubscriptionAutoAck
- auto acknowledge statuspublic boolean isSubscriptionAutoAck()
public MqttEndpoint publishAutoAck(boolean isPublishAutoAck)
isPublishAutoAck
- auto acknowledge statuspublic boolean isPublishAutoAck()
public MqttEndpoint autoKeepAlive(boolean isAutoKeepAlive)
isAutoKeepAlive
- auto keep alivepublic boolean isAutoKeepAlive()
public boolean isConnected()
public MqttEndpoint setClientIdentifier(String clientIdentifier)
clientIdentifier
- the client identifierpublic MqttEndpoint disconnectHandler(Handler<Void> handler)
handler
- the handlerpublic MqttEndpoint subscribeHandler(Handler<MqttSubscribeMessage> handler)
handler
- the handlerpublic MqttEndpoint unsubscribeHandler(Handler<MqttUnsubscribeMessage> handler)
handler
- the handlerpublic MqttEndpoint publishHandler(Handler<MqttPublishMessage> handler)
handler
- the handlerpublic MqttEndpoint publishAcknowledgeHandler(Handler<Integer> handler)
handler
- the handlerpublic MqttEndpoint publishReceivedHandler(Handler<Integer> handler)
handler
- the handlerpublic MqttEndpoint publishReleaseHandler(Handler<Integer> handler)
handler
- the handlerpublic MqttEndpoint publishCompleteHandler(Handler<Integer> handler)
handler
- the handlerpublic MqttEndpoint pingHandler(Handler<Void> handler)
handler
- the handlerpublic MqttEndpoint closeHandler(Handler<Void> handler)
handler
- the handlerpublic MqttEndpoint exceptionHandler(Handler<Throwable> handler)
handler
- the handlerpublic MqttEndpoint accept(boolean sessionPresent)
reject(io.netty.handler.codec.mqtt.MqttConnectReturnCode)
for refusing connectionsessionPresent
- if a previous session is presentpublic MqttEndpoint reject(MqttConnectReturnCode returnCode)
accept(boolean)
for accepting connectionreturnCode
- the connect return codepublic MqttEndpoint subscribeAcknowledge(int subscribeMessageId, List<MqttQoS> grantedQoSLevels)
subscribeMessageId
- identifier of the SUBSCRIBE message to acknowledgegrantedQoSLevels
- granted QoS levels for the requested topicspublic MqttEndpoint unsubscribeAcknowledge(int unsubscribeMessageId)
unsubscribeMessageId
- identifier of the UNSUBSCRIBE message to acknowledgepublic MqttEndpoint publishAcknowledge(int publishMessageId)
publishMessageId
- identifier of the PUBLISH message to acknowledgepublic MqttEndpoint publishReceived(int publishMessageId)
publishMessageId
- identifier of the PUBLISH message to acknowledgepublic MqttEndpoint publishRelease(int publishMessageId)
publishMessageId
- identifier of the PUBLISH message to acknowledgepublic MqttEndpoint publishComplete(int publishMessageId)
publishMessageId
- identifier of the PUBLISH message to acknowledgepublic MqttEndpoint publish(String topic, Buffer payload, MqttQoS qosLevel, boolean isDup, boolean isRetain)
topic
- topic on which the message is publishedpayload
- message payloadqosLevel
- quality of service levelisDup
- if the message is a duplicateisRetain
- if the message needs to be retainedpublic MqttEndpoint pong()
public static MqttEndpoint newInstance(MqttEndpoint arg)
Copyright © 2017. All rights reserved.