Class MqttEndpoint
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
MqttEndpoint
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMqttEndpoint(io.vertx.mqtt.MqttEndpoint delegate) Create a new instance ofMqttEndpointdelegating to the given (non-null) instance ofMqttEndpoint.MqttEndpoint(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionaccept()Likeaccept(boolean)with no session is present.accept(boolean sessionPresent) Sends the CONNACK message to the remote MQTT client with "connection accepted" return code.accept(boolean sessionPresent, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the CONNACK message to the remote MQTT client with "connection accepted" return code.io.vertx.mqtt.MqttAuthauth()Sends the AUTH message to the remote MQTT clientSet the auth handler on the MQTT endpoint.autoKeepAlive(boolean isAutoKeepAlive) Enable/disable auto keep alive (sending ping response)voidclose()Close the endpoint, so the connection with remote MQTT clientcloseHandler(Runnable handler) Set a close handler.io.netty.handler.codec.mqtt.MqttPropertiesdisconnect(io.vertx.mqtt.messages.codes.MqttDisconnectReasonCode code, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the DISCONNECT message to the remote MQTT clientdisconnectHandler(Runnable handler) Set a disconnect handler on the MQTT endpoint.Set a disconnect handler on the MQTT endpoint.booleanexceptionHandler(Consumer<Throwable> handler) Set an exception handler.io.vertx.mqtt.MqttEndpointGet the delegate instance.inthashCode()io.vertx.core.MultiMapReturns the HTTP headers sent by the client when a WebSocket transport is used otherwisenullReturns the HTTP request URI sent by the client when a WebSocket transport is used otherwisenullbooleanbooleanbooleanbooleanbooleanisSsl()booleanintintio.vertx.core.net.SocketAddressstatic MqttEndpointnewInstance(io.vertx.mqtt.MqttEndpoint delegate) Creates a new instance of theMqttEndpoint.pingHandler(Runnable handler) Set the pingreq handler on the MQTT endpoint.pong()Sends the PINGRESP message to the remote MQTT clientintio.smallrye.mutiny.Uni<Integer>publish(String topic, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain) Sends the PUBLISH message to the remote MQTT clientio.smallrye.mutiny.Uni<Integer>publish(String topic, io.vertx.core.buffer.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 messageIdio.smallrye.mutiny.Uni<Integer>publish(String topic, io.vertx.core.buffer.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 messageIdpublishAcknowledge(int publishMessageId) Sends the PUBACK message to the remote MQTT clientpublishAcknowledge(int publishMessageId, io.vertx.mqtt.messages.codes.MqttPubAckReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties) publishAcknowledgeHandler(Consumer<Integer> handler) Set the puback handler on the MQTT endpoint.Set the puback handler on the MQTT endpoint.publishAndAwait(String topic, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain) Sends the PUBLISH message to the remote MQTT clientpublishAndAwait(String topic, io.vertx.core.buffer.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 messageIdpublishAndAwait(String topic, io.vertx.core.buffer.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 messageIdpublishAndForget(String topic, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain) Sends the PUBLISH message to the remote MQTT clientpublishAndForget(String topic, io.vertx.core.buffer.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 messageIdpublishAndForget(String topic, io.vertx.core.buffer.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 messageIdpublishAutoAck(boolean isPublishAutoAck) Enable/disable publishing (in/out) auto acknowledgepublishComplete(int publishMessageId) Sends the PUBCOMP message to the remote MQTT clientpublishComplete(int publishMessageId, io.vertx.mqtt.messages.codes.MqttPubCompReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the PUBCOMP message to the remote MQTT clientpublishCompletionHandler(Consumer<Integer> handler) Set the pubcomp handler on the MQTT endpoint.Set the pubcomp handler on the MQTT endpoint.publishHandler(Consumer<MqttPublishMessage> handler) Set the publish handler on the MQTT endpoint.publishReceived(int publishMessageId) Sends the PUBREC message to the remote MQTT clientpublishReceived(int publishMessageId, io.vertx.mqtt.messages.codes.MqttPubRecReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the PUBREC message to the remote MQTT clientpublishReceivedHandler(Consumer<Integer> handler) Set the pubrec handler on the MQTT endpoint.Set the pubrec handler on the MQTT endpoint.publishRelease(int publishMessageId) Sends the PUBREL message to the remote MQTT clientpublishRelease(int publishMessageId, io.vertx.mqtt.messages.codes.MqttPubRelReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the PUBREL message to the remote MQTT clientpublishReleaseHandler(Consumer<Integer> handler) Set the pubrel handler on the MQTT endpoint.Set the pubrel handler on the MQTT endpoint.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.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.io.vertx.core.net.SocketAddresssetClientIdentifier(String clientIdentifier) Set client identifier if not provided by the remote MQTT client (zero-bytes)subscribeAcknowledge(int subscribeMessageId, List<io.netty.handler.codec.mqtt.MqttQoS> grantedQoSLevels) Sends the SUBACK message to the remote MQTT clientsubscribeAcknowledge(int subscribeMessageId, List<io.vertx.mqtt.messages.codes.MqttSubAckReasonCode> reasonCodes, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the SUBACK message to the remote MQTT clientsubscribeHandler(Consumer<MqttSubscribeMessage> handler) Set a subscribe handler on the MQTT endpoint.voidsubscriptionAutoAck(boolean isSubscriptionAutoAck) Enable/disable subscription/unsubscription requests auto acknowledgetoString()unsubscribeAcknowledge(int unsubscribeMessageId) Sends the UNSUBACK message to the remote MQTT clientunsubscribeAcknowledge(int unsubscribeMessageId, List<io.vertx.mqtt.messages.codes.MqttUnsubAckReasonCode> reasonCodes, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the UNSUBACK message to the remote MQTT clientunsubscribeHandler(Consumer<MqttUnsubscribeMessage> handler) Set a unsubscribe handler on the MQTT endpoint.io.vertx.mqtt.MqttWillwill()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
MqttEndpoint
public MqttEndpoint(io.vertx.mqtt.MqttEndpoint delegate) Create a new instance ofMqttEndpointdelegating to the given (non-null) instance ofMqttEndpoint. -
MqttEndpoint
-
-
Method Details
-
getDelegate
public io.vertx.mqtt.MqttEndpoint getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
publish
@CheckReturnValue public io.smallrye.mutiny.Uni<Integer> publish(String topic, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain) Sends the PUBLISH message to the remote MQTT clientUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
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 retained- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean)
-
publishAndAwait
public Integer publishAndAwait(String topic, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain) Sends the PUBLISH message to the remote MQTT clientUnlike the bare Vert.x variant, this method returns a
Integer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
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 retained- Returns:
- The operation result
- See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean)
-
publishAndForget
public MqttEndpoint publishAndForget(String topic, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain) Sends the PUBLISH message to the remote MQTT clientUnlike the bare Vert.x variant, this method ignores the
Integerresult or any failure.- Parameters:
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 retained- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean)
-
publish
@CheckReturnValue public io.smallrye.mutiny.Uni<Integer> publish(String topic, io.vertx.core.buffer.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 messageIdUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
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 ID- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean, int)
-
publishAndAwait
public Integer publishAndAwait(String topic, io.vertx.core.buffer.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 messageIdUnlike the bare Vert.x variant, this method returns a
Integer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
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 ID- Returns:
- The operation result
- See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean, int)
-
publishAndForget
public MqttEndpoint publishAndForget(String topic, io.vertx.core.buffer.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 messageIdUnlike the bare Vert.x variant, this method ignores the
Integerresult or any failure.- Parameters:
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 ID- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean, int)
-
publish
@CheckReturnValue public io.smallrye.mutiny.Uni<Integer> publish(String topic, io.vertx.core.buffer.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 messageIdUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
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 properties- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean, int, MqttProperties)
-
publishAndAwait
public Integer publishAndAwait(String topic, io.vertx.core.buffer.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 messageIdUnlike the bare Vert.x variant, this method returns a
Integer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
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 properties- Returns:
- The operation result
- See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean, int, MqttProperties)
-
publishAndForget
public MqttEndpoint publishAndForget(String topic, io.vertx.core.buffer.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 messageIdUnlike the bare Vert.x variant, this method ignores the
Integerresult or any failure.- Parameters:
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 properties- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MqttEndpoint.publish(String, Buffer, MqttQoS, boolean, boolean, int, MqttProperties)
-
close
public void close()Close the endpoint, so the connection with remote MQTT client -
remoteAddress
public io.vertx.core.net.SocketAddress remoteAddress()- Returns:
- the remote address for this socket
-
localAddress
public io.vertx.core.net.SocketAddress localAddress()- Returns:
- the local address for this socket
-
isSsl
public boolean isSsl()- Returns:
- true if this
MqttEndpointis encrypted via SSL/TLS.
-
httpHeaders
public io.vertx.core.MultiMap httpHeaders()Returns the HTTP headers sent by the client when a WebSocket transport is used otherwisenull- Returns:
- the HTTP headers
-
httpRequestURI
Returns the HTTP request URI sent by the client when a WebSocket transport is used otherwisenull- Returns:
- the HTTP request uri
-
clientIdentifier
- Returns:
- the client identifier as provided by the remote MQTT client
-
auth
public io.vertx.mqtt.MqttAuth auth()- Returns:
- the Authentication information as provided by the remote MQTT client,
or
nullwhen neither username nor password information is available
-
will
public io.vertx.mqtt.MqttWill will()- Returns:
- the Will information as provided by the remote MQTT client
-
protocolVersion
public int protocolVersion()- Returns:
- the protocol version required by the remote MQTT client
-
protocolName
- Returns:
- the protocol name provided by the remote MQTT client
-
isCleanSession
public boolean isCleanSession()- Returns:
- true when clean session is requested by the remote MQTT client
-
keepAliveTimeSeconds
public int keepAliveTimeSeconds()- Returns:
- the keep alive timeout (in seconds) specified by the remote MQTT client
-
lastMessageId
public int lastMessageId()- Returns:
- the message identifier used for last published message
-
subscriptionAutoAck
public void subscriptionAutoAck(boolean isSubscriptionAutoAck) Enable/disable subscription/unsubscription requests auto acknowledge- Parameters:
isSubscriptionAutoAck- auto acknowledge status
-
isSubscriptionAutoAck
public boolean isSubscriptionAutoAck()- Returns:
- true when auto acknowledge status for subscription/unsubscription requests
-
publishAutoAck
Enable/disable publishing (in/out) auto acknowledge- Parameters:
isPublishAutoAck- auto acknowledge status- Returns:
- a reference to this, so the API can be used fluently
-
isPublishAutoAck
public boolean isPublishAutoAck()- Returns:
- auto acknowledge status for publishing (in/out)
-
autoKeepAlive
Enable/disable auto keep alive (sending ping response)- Parameters:
isAutoKeepAlive- auto keep alive- Returns:
- a reference to this, so the API can be used fluently
-
isAutoKeepAlive
public boolean isAutoKeepAlive()- Returns:
- the auto keep alive status (sending ping response)
-
isConnected
public boolean isConnected()- Returns:
- if the connection between remote client and local endpoint is established/open
-
connectProperties
public io.netty.handler.codec.mqtt.MqttProperties connectProperties()- Returns:
- MQTT properties of the CONNECT message
-
setClientIdentifier
Set client identifier if not provided by the remote MQTT client (zero-bytes)- Parameters:
clientIdentifier- the client identifier- Returns:
- a reference to this, so the API can be used fluently
-
disconnectHandler
Set a disconnect handler on the MQTT endpoint. This handler is called when a DISCONNECT message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
disconnectMessageHandler
Set a disconnect handler on the MQTT endpoint. This handler is called when a DISCONNECT message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
subscribeHandler
Set a subscribe handler on the MQTT endpoint. This handler is called when a SUBSCRIBE message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
unsubscribeHandler
Set a unsubscribe handler on the MQTT endpoint. This handler is called when a UNSUBSCRIBE message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishHandler
Set the publish handler on the MQTT endpoint. This handler is called when a PUBLISH message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishAcknowledgeHandler
Set the puback handler on the MQTT endpoint. This handler is called when a PUBACK message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishAcknowledgeMessageHandler
Set the puback handler on the MQTT endpoint. This handler is called when a PUBACK message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishReceivedHandler
Set the pubrec handler on the MQTT endpoint. This handler is called when a PUBREC message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishReceivedMessageHandler
Set the pubrec handler on the MQTT endpoint. This handler is called when a PUBREC message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishReleaseHandler
Set the pubrel handler on the MQTT endpoint. This handler is called when a PUBREL message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishReleaseMessageHandler
Set the pubrel handler on the MQTT endpoint. This handler is called when a PUBREL message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishCompletionHandler
Set the pubcomp handler on the MQTT endpoint. This handler is called when a PUBCOMP message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
publishCompletionMessageHandler
Set the pubcomp handler on the MQTT endpoint. This handler is called when a PUBCOMP message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
authenticationExchangeHandler
public MqttEndpoint authenticationExchangeHandler(Consumer<MqttAuthenticationExchangeMessage> handler) Set the auth handler on the MQTT endpoint. This handler is called when a AUTH message is received by the remote MQTT client- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
pingHandler
Set the pingreq handler on the MQTT endpoint. This handler is called when a PINGREQ message is received by the remote MQTT client. In any case the endpoint sends the PINGRESP internally after executing this handler.- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
closeHandler
Set a close handler. This will be called when the MQTT endpoint is closed- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
exceptionHandler
Set an exception handler. This will be called when an error at protocol level happens- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
accept
Likeaccept(boolean)with no session is present. -
accept
Sends the CONNACK message to the remote MQTT client with "connection accepted" return code. Seereject(MqttConnectReturnCode)for refusing connection- Parameters:
sessionPresent- if a previous session is present- Returns:
- a reference to this, so the API can be used fluently
-
accept
public 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. Seereject(MqttConnectReturnCode)for refusing connection- Parameters:
sessionPresent- if a previous session is presentproperties- CONNACK message properties (MQTT5)- Returns:
- a reference to this, so the API can be used fluently
-
reject
Sends the CONNACK message to the remote MQTT client rejecting the connection request with specified return code. Seeaccept(boolean)for accepting connection- Parameters:
returnCode- the connect return code- Returns:
- a reference to this, so the API can be used fluently
-
reject
public 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. Seeaccept(boolean)for accepting connection- Parameters:
returnCode- the connect return codeproperties- CONNACK message properties- Returns:
- a reference to this, so the API can be used fluently
-
subscribeAcknowledge
public MqttEndpoint subscribeAcknowledge(int subscribeMessageId, List<io.netty.handler.codec.mqtt.MqttQoS> grantedQoSLevels) Sends the SUBACK message to the remote MQTT client- Parameters:
subscribeMessageId- identifier of the SUBSCRIBE message to acknowledgegrantedQoSLevels- granted QoS levels for the requested topics- Returns:
- a reference to this, so the API can be used fluently
-
subscribeAcknowledge
public MqttEndpoint subscribeAcknowledge(int subscribeMessageId, List<io.vertx.mqtt.messages.codes.MqttSubAckReasonCode> reasonCodes, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the SUBACK message to the remote MQTT client- Parameters:
subscribeMessageId- identifier of the SUBSCRIBE message to acknowledgereasonCodes- reason codesproperties- MQTT message properties- Returns:
- a reference to this, so the API can be used fluently
-
unsubscribeAcknowledge
Sends the UNSUBACK message to the remote MQTT client- Parameters:
unsubscribeMessageId- identifier of the UNSUBSCRIBE message to acknowledge- Returns:
- a reference to this, so the API can be used fluently
-
unsubscribeAcknowledge
public MqttEndpoint unsubscribeAcknowledge(int unsubscribeMessageId, List<io.vertx.mqtt.messages.codes.MqttUnsubAckReasonCode> reasonCodes, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the UNSUBACK message to the remote MQTT client- Parameters:
unsubscribeMessageId- identifier of the UNSUBSCRIBE message to acknowledgereasonCodes- reason codesproperties- MQTT message properties- Returns:
- a reference to this, so the API can be used fluently
-
publishAcknowledge
Sends the PUBACK message to the remote MQTT client- Parameters:
publishMessageId- identifier of the PUBLISH message to acknowledge- Returns:
- a reference to this, so the API can be used fluently
-
publishAcknowledge
public MqttEndpoint publishAcknowledge(int publishMessageId, io.vertx.mqtt.messages.codes.MqttPubAckReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties) -
publishReceived
Sends the PUBREC message to the remote MQTT client- Parameters:
publishMessageId- identifier of the PUBLISH message to acknowledge- Returns:
- a reference to this, so the API can be used fluently
-
publishReceived
public MqttEndpoint publishReceived(int publishMessageId, io.vertx.mqtt.messages.codes.MqttPubRecReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the PUBREC message to the remote MQTT client- Parameters:
publishMessageId- identifier of the PUBLISH message to acknowledgereasonCode- code of the outcomeproperties- MQTT properties- Returns:
- a reference to this, so the API can be used fluently
-
publishRelease
Sends the PUBREL message to the remote MQTT client- Parameters:
publishMessageId- identifier of the PUBLISH message to acknowledge- Returns:
- a reference to this, so the API can be used fluently
-
publishRelease
public MqttEndpoint publishRelease(int publishMessageId, io.vertx.mqtt.messages.codes.MqttPubRelReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the PUBREL message to the remote MQTT client- Parameters:
publishMessageId- identifier of the PUBLISH message to acknowledgereasonCode- reason codeproperties- MQTT message properties- Returns:
- a reference to this, so the API can be used fluently
-
publishComplete
Sends the PUBCOMP message to the remote MQTT client- Parameters:
publishMessageId- identifier of the PUBLISH message to acknowledge- Returns:
- a reference to this, so the API can be used fluently
-
publishComplete
public MqttEndpoint publishComplete(int publishMessageId, io.vertx.mqtt.messages.codes.MqttPubCompReasonCode reasonCode, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the PUBCOMP message to the remote MQTT client- Parameters:
publishMessageId- identifier of the PUBLISH message to acknowledgereasonCode- reason codeproperties- MQTT message properties- Returns:
- a reference to this, so the API can be used fluently
-
authenticationExchange
Sends the AUTH message to the remote MQTT client- Parameters:
message-- Returns:
- a reference to this, so the API can be used fluently
-
pong
Sends the PINGRESP message to the remote MQTT client- Returns:
- a reference to this, so the API can be used fluently
-
disconnect
public MqttEndpoint disconnect(io.vertx.mqtt.messages.codes.MqttDisconnectReasonCode code, io.netty.handler.codec.mqtt.MqttProperties properties) Sends the DISCONNECT message to the remote MQTT client- Parameters:
code- reason codeproperties- MQTT message properties- Returns:
- a reference to this, so the API can be used fluently
-
newInstance
Creates a new instance of theMqttEndpoint. -
hashCode
public int hashCode() -
equals
-
toString
-