Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<MqttEndpoint> |
__TYPE_ARG |
Constructor and Description |
---|
MqttEndpoint(MqttEndpoint delegate) |
MqttEndpoint(Object delegate) |
Modifier and Type | Method and Description |
---|---|
MqttEndpoint |
accept()
Like
accept() with no session is present. |
MqttEndpoint |
accept(boolean sessionPresent)
Sends the CONNACK message to the remote MQTT client with "connection accepted"
return code.
|
MqttEndpoint |
accept(boolean sessionPresent,
io.netty.handler.codec.mqtt.MqttProperties properties)
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.
|
io.netty.handler.codec.mqtt.MqttProperties |
connectProperties() |
MqttEndpoint |
disconnect(MqttDisconnectReasonCode code,
io.netty.handler.codec.mqtt.MqttProperties properties)
Sends the DISCONNECT message to the remote MQTT client
|
MqttEndpoint |
disconnectHandler(Handler<Void> handler)
Set a disconnect handler on the MQTT endpoint.
|
MqttEndpoint |
disconnectMessageHandler(Handler<MqttDisconnectMessage> handler)
Set a disconnect handler on the MQTT endpoint.
|
boolean |
equals(Object o) |
MqttEndpoint |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler.
|
MqttEndpoint |
getDelegate() |
int |
hashCode() |
MultiMap |
httpHeaders()
Returns the HTTP headers sent by the client when a WebSocket transport is used otherwise
null |
String |
httpRequestURI()
Returns the HTTP request URI sent by the client when a WebSocket transport is used otherwise
null |
boolean |
isAutoKeepAlive() |
boolean |
isCleanSession() |
boolean |
isConnected() |
boolean |
isPublishAutoAck() |
boolean |
isSsl() |
boolean |
isSubscriptionAutoAck() |
int |
keepAliveTimeSeconds() |
int |
lastMessageId() |
SocketAddress |
localAddress() |
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() |
Single<Integer> |
publish(String topic,
Buffer payload,
io.netty.handler.codec.mqtt.MqttQoS qosLevel,
boolean isDup,
boolean isRetain)
Sends the PUBLISH message to the remote MQTT server
|
Single<Integer> |
publish(String topic,
Buffer payload,
io.netty.handler.codec.mqtt.MqttQoS qosLevel,
boolean isDup,
boolean isRetain,
int messageId)
Sends the PUBLISH message to the remote MQTT server explicitly specifying the messageId
|
Single<Integer> |
publish(String topic,
Buffer payload,
io.netty.handler.codec.mqtt.MqttQoS qosLevel,
boolean isDup,
boolean isRetain,
int messageId,
io.netty.handler.codec.mqtt.MqttProperties properties)
Sends the PUBLISH message to the remote MQTT server explicitly specifying the messageId
|
MqttEndpoint |
publishAcknowledge(int publishMessageId)
Sends the PUBACK message to the remote MQTT client
|
MqttEndpoint |
publishAcknowledge(int publishMessageId,
MqttPubAckReasonCode reasonCode,
io.netty.handler.codec.mqtt.MqttProperties properties) |
MqttEndpoint |
publishAcknowledgeHandler(Handler<Integer> handler)
Set the puback handler on the MQTT endpoint.
|
MqttEndpoint |
publishAcknowledgeMessageHandler(Handler<MqttPubAckMessage> 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 |
publishComplete(int publishMessageId,
MqttPubCompReasonCode reasonCode,
io.netty.handler.codec.mqtt.MqttProperties properties)
Sends the PUBCOMP message to the remote MQTT client
|
MqttEndpoint |
publishCompletionHandler(Handler<Integer> handler)
Set the pubcomp handler on the MQTT endpoint.
|
MqttEndpoint |
publishCompletionMessageHandler(Handler<MqttPubCompMessage> 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 |
publishReceived(int publishMessageId,
MqttPubRecReasonCode reasonCode,
io.netty.handler.codec.mqtt.MqttProperties properties)
Sends the PUBREC message to the remote MQTT client
|
MqttEndpoint |
publishReceivedHandler(Handler<Integer> handler)
Set the pubrec handler on the MQTT endpoint.
|
MqttEndpoint |
publishReceivedMessageHandler(Handler<MqttPubRecMessage> handler)
Set the pubrec handler on the MQTT endpoint.
|
MqttEndpoint |
publishRelease(int publishMessageId)
Sends the PUBREL message to the remote MQTT client
|
MqttEndpoint |
publishRelease(int publishMessageId,
MqttPubRelReasonCode reasonCode,
io.netty.handler.codec.mqtt.MqttProperties properties)
Sends the PUBREL message to the remote MQTT client
|
MqttEndpoint |
publishReleaseHandler(Handler<Integer> handler)
Set the pubrel handler on the MQTT endpoint.
|
MqttEndpoint |
publishReleaseMessageHandler(Handler<MqttPubRelMessage> handler)
Set the pubrel handler on the MQTT endpoint.
|
MqttEndpoint |
reject(io.netty.handler.codec.mqtt.MqttConnectReturnCode returnCode)
Sends the CONNACK message to the remote MQTT client rejecting the connection
request with specified return code.
|
MqttEndpoint |
reject(io.netty.handler.codec.mqtt.MqttConnectReturnCode returnCode,
io.netty.handler.codec.mqtt.MqttProperties properties)
Sends the CONNACK message to the remote MQTT client rejecting the connection
request with specified return code.
|
SocketAddress |
remoteAddress() |
Single<Integer> |
rxPublish(String topic,
Buffer payload,
io.netty.handler.codec.mqtt.MqttQoS qosLevel,
boolean isDup,
boolean isRetain)
Sends the PUBLISH message to the remote MQTT server
|
Single<Integer> |
rxPublish(String topic,
Buffer payload,
io.netty.handler.codec.mqtt.MqttQoS qosLevel,
boolean isDup,
boolean isRetain,
int messageId)
Sends the PUBLISH message to the remote MQTT server explicitly specifying the messageId
|
Single<Integer> |
rxPublish(String topic,
Buffer payload,
io.netty.handler.codec.mqtt.MqttQoS qosLevel,
boolean isDup,
boolean isRetain,
int messageId,
io.netty.handler.codec.mqtt.MqttProperties properties)
Sends the PUBLISH message to the remote MQTT server explicitly specifying the messageId
|
MqttEndpoint |
setClientIdentifier(String clientIdentifier)
Set client identifier if not provided by the remote MQTT client (zero-bytes)
|
MqttEndpoint |
subscribeAcknowledge(int subscribeMessageId,
List<io.netty.handler.codec.mqtt.MqttQoS> grantedQoSLevels)
Sends the SUBACK message to the remote MQTT client
|
MqttEndpoint |
subscribeAcknowledge(int subscribeMessageId,
List<MqttSubAckReasonCode> reasonCodes,
io.netty.handler.codec.mqtt.MqttProperties properties)
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
|
String |
toString() |
MqttEndpoint |
unsubscribeAcknowledge(int unsubscribeMessageId)
Sends the UNSUBACK message to the remote MQTT client
|
MqttEndpoint |
unsubscribeAcknowledge(int unsubscribeMessageId,
List<MqttUnsubAckReasonCode> reasonCodes,
io.netty.handler.codec.mqtt.MqttProperties properties)
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 io.vertx.lang.rx.TypeArg<MqttEndpoint> __TYPE_ARG
public MqttEndpoint(MqttEndpoint delegate)
public MqttEndpoint(Object delegate)
public MqttEndpoint getDelegate()
public void close()
public SocketAddress remoteAddress()
public SocketAddress localAddress()
public boolean isSsl()
MqttEndpoint
is encrypted via SSL/TLS.public MultiMap httpHeaders()
null
public String httpRequestURI()
null
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 disconnectMessageHandler(Handler<MqttDisconnectMessage> 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 publishAcknowledgeMessageHandler(Handler<MqttPubAckMessage> handler)
handler
- the handlerpublic MqttEndpoint publishReceivedHandler(Handler<Integer> handler)
handler
- the handlerpublic MqttEndpoint publishReceivedMessageHandler(Handler<MqttPubRecMessage> handler)
handler
- the handlerpublic MqttEndpoint publishReleaseHandler(Handler<Integer> handler)
handler
- the handlerpublic MqttEndpoint publishReleaseMessageHandler(Handler<MqttPubRelMessage> handler)
handler
- the handlerpublic MqttEndpoint publishCompletionHandler(Handler<Integer> handler)
handler
- the handlerpublic MqttEndpoint publishCompletionMessageHandler(Handler<MqttPubCompMessage> 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()
accept()
with no session is present.public MqttEndpoint accept(boolean sessionPresent)
reject(io.netty.handler.codec.mqtt.MqttConnectReturnCode)
for refusing connectionsessionPresent
- if a previous session is presentpublic MqttEndpoint reject(io.netty.handler.codec.mqtt.MqttConnectReturnCode returnCode)
accept()
for accepting connectionreturnCode
- the connect return codepublic MqttEndpoint subscribeAcknowledge(int subscribeMessageId, List<io.netty.handler.codec.mqtt.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 Single<Integer> publish(String topic, Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain)
topic
- topic on which the message is publishedpayload
- message payloadqosLevel
- QoS levelisDup
- if the message is a duplicateisRetain
- if the message needs to be retainedpublic Single<Integer> rxPublish(String topic, Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain)
topic
- topic on which the message is publishedpayload
- message payloadqosLevel
- QoS levelisDup
- if the message is a duplicateisRetain
- if the message needs to be retainedpublic Single<Integer> publish(String topic, Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain, int messageId)
topic
- topic on which the message is publishedpayload
- message payloadqosLevel
- QoS levelisDup
- if the message is a duplicateisRetain
- if the message needs to be retainedmessageId
- message IDpublic Single<Integer> rxPublish(String topic, Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain, int messageId)
topic
- topic on which the message is publishedpayload
- message payloadqosLevel
- QoS levelisDup
- if the message is a duplicateisRetain
- if the message needs to be retainedmessageId
- message IDpublic MqttEndpoint pong()
public io.netty.handler.codec.mqtt.MqttProperties connectProperties()
public MqttEndpoint accept(boolean sessionPresent, io.netty.handler.codec.mqtt.MqttProperties properties)
reject(io.netty.handler.codec.mqtt.MqttConnectReturnCode)
for refusing connectionsessionPresent
- if a previous session is presentproperties
- CONNACK message properties (MQTT5)public MqttEndpoint reject(io.netty.handler.codec.mqtt.MqttConnectReturnCode returnCode, io.netty.handler.codec.mqtt.MqttProperties properties)
accept()
for accepting connectionreturnCode
- the connect return codeproperties
- CONNACK message propertiespublic MqttEndpoint subscribeAcknowledge(int subscribeMessageId, List<MqttSubAckReasonCode> reasonCodes, io.netty.handler.codec.mqtt.MqttProperties properties)
subscribeMessageId
- identifier of the SUBSCRIBE message to acknowledgereasonCodes
- reason codesproperties
- MQTT message propertiespublic MqttEndpoint unsubscribeAcknowledge(int unsubscribeMessageId, List<MqttUnsubAckReasonCode> reasonCodes, io.netty.handler.codec.mqtt.MqttProperties properties)
unsubscribeMessageId
- identifier of the UNSUBSCRIBE message to acknowledgereasonCodes
- reason codesproperties
- MQTT message propertiespublic MqttEndpoint publishAcknowledge(int publishMessageId, MqttPubAckReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties)
public MqttEndpoint publishReceived(int publishMessageId, MqttPubRecReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties)
publishMessageId
- identifier of the PUBLISH message to acknowledgereasonCode
- code of the outcomeproperties
- MQTT propertiespublic MqttEndpoint publishRelease(int publishMessageId, MqttPubRelReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties)
publishMessageId
- identifier of the PUBLISH message to acknowledgereasonCode
- reason codeproperties
- MQTT message propertiespublic MqttEndpoint publishComplete(int publishMessageId, MqttPubCompReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties)
publishMessageId
- identifier of the PUBLISH message to acknowledgereasonCode
- reason codeproperties
- MQTT message propertiespublic Single<Integer> publish(String topic, Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain, int messageId, io.netty.handler.codec.mqtt.MqttProperties properties)
topic
- topic on which the message is publishedpayload
- message payloadqosLevel
- QoS levelisDup
- if the message is a duplicateisRetain
- if the message needs to be retainedmessageId
- message IDproperties
- PUBLISH message propertiespublic Single<Integer> rxPublish(String topic, Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain, int messageId, io.netty.handler.codec.mqtt.MqttProperties properties)
topic
- topic on which the message is publishedpayload
- message payloadqosLevel
- QoS levelisDup
- if the message is a duplicateisRetain
- if the message needs to be retainedmessageId
- message IDproperties
- PUBLISH message propertiespublic MqttEndpoint disconnect(MqttDisconnectReasonCode code, io.netty.handler.codec.mqtt.MqttProperties properties)
code
- reason codeproperties
- MQTT message propertiespublic static MqttEndpoint newInstance(MqttEndpoint arg)
Copyright © 2022 Eclipse. All rights reserved.