Class: VertxMqttServer::MqttEndpoint
- Inherits:
-
Object
- Object
- VertxMqttServer::MqttEndpoint
- Defined in:
- /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb
Overview
Represents an MQTT endpoint for point-to-point communication with the remote MQTT client
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (self) accept(sessionPresent = nil)
Sends the CONNACK message to the remote MQTT client with "connection accepted" return code.
-
- (::VertxMqttServer::MqttAuth) auth
The Authentication information as provided by the remote MQTT client.
-
- (self) auto_keep_alive(isAutoKeepAlive = nil)
Enable/disable auto keep alive (sending ping response).
-
- (true, false) auto_keep_alive?
The auto keep alive status (sending ping response).
-
- (true, false) clean_session?
True when clean session is requested by the remote MQTT client.
-
- (String) client_identifier
The client identifier as provided by the remote MQTT client.
-
- (void) close
Close the endpoint, so the connection with remote MQTT client.
-
- (self) close_handler { ... }
Set a close handler.
-
- (true, false) connected?
If the connection between remote client and local endpoint is established/open.
-
- (self) disconnect_handler { ... }
Set a disconnect handler on the MQTT endpoint.
-
- (self) exception_handler { ... }
Set an exception handler.
-
- (Fixnum) keep_alive_time_seconds
The keep alive timeout (in seconds) specified by the remote MQTT client.
-
- (Fixnum) last_message_id
The message identifier used for last published message.
-
- (self) ping_handler { ... }
Set the pingreq handler on the MQTT endpoint.
-
- (self) pong
Sends the PINGRESP message to the remote MQTT client.
-
- (String) protocol_name
The protocol name provided by the remote MQTT client.
-
- (Fixnum) protocol_version
The protocol version required by the remote MQTT client.
-
- (self) publish(topic = nil, payload = nil, qosLevel = nil, isDup = nil, isRetain = nil)
Sends the PUBLISH message to the remote MQTT client.
-
- (self) publish_acknowledge(publishMessageId = nil)
Sends the PUBACK message to the remote MQTT client.
-
- (self) publish_acknowledge_handler { ... }
Set the puback handler on the MQTT endpoint.
-
- (self) publish_auto_ack(isPublishAutoAck = nil)
Enable/disable publishing (in/out) auto acknowledge.
-
- (true, false) publish_auto_ack?
Auto acknowledge status for publishing (in/out).
-
- (self) publish_complete(publishMessageId = nil)
Sends the PUBCOMP message to the remote MQTT client.
-
- (self) publish_complete_handler { ... }
Set the pubcomp handler on the MQTT endpoint.
-
- (self) publish_handler { ... }
Set the publish handler on the MQTT endpoint.
-
- (self) publish_received(publishMessageId = nil)
Sends the PUBREC message to the remote MQTT client.
-
- (self) publish_received_handler { ... }
Set the pubrec handler on the MQTT endpoint.
-
- (self) publish_release(publishMessageId = nil)
Sends the PUBREL message to the remote MQTT client.
-
- (self) publish_release_handler { ... }
Set the pubrel handler on the MQTT endpoint.
-
- (self) reject(returnCode = nil)
Sends the CONNACK message to the remote MQTT client rejecting the connection request with specified return code.
-
- (self) set_client_identifier(clientIdentifier = nil)
Set client identifier if not provided by the remote MQTT client (zero-bytes).
-
- (self) subscribe_acknowledge(subscribeMessageId = nil, grantedQoSLevels = nil)
Sends the SUBACK message to the remote MQTT client.
-
- (self) subscribe_handler { ... }
Set a subscribe handler on the MQTT endpoint.
-
- (void) subscription_auto_ack(isSubscriptionAutoAck = nil)
Enable/disable subscription/unsubscription requests auto acknowledge.
-
- (true, false) subscription_auto_ack?
True when auto acknowledge status for subscription/unsubscription requests.
-
- (self) unsubscribe_acknowledge(unsubscribeMessageId = nil)
Sends the UNSUBACK message to the remote MQTT client.
-
- (self) unsubscribe_handler { ... }
Set a unsubscribe handler on the MQTT endpoint.
-
- (::VertxMqttServer::MqttWill) will
The Will information as provided by the remote MQTT client.
Class Method Details
+ (Boolean) accept?(obj)
23 24 25 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 23 def @@j_api_type.accept?(obj) obj.class == MqttEndpoint end |
+ (Object) j_api_type
32 33 34 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 32 def self.j_api_type @@j_api_type end |
+ (Object) j_class
35 36 37 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 35 def self.j_class Java::IoVertxMqtt::MqttEndpoint.java_class end |
+ (Object) unwrap(obj)
29 30 31 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 29 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
26 27 28 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 26 def @@j_api_type.wrap(obj) MqttEndpoint.new(obj) end |
Instance Method Details
- (self) accept(sessionPresent = nil)
Sends the CONNACK message to the remote MQTT client with "connection accepted"
return code. See #reject for refusing connection
317 318 319 320 321 322 323 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 317 def accept(sessionPresent=nil) if (sessionPresent.class == TrueClass || sessionPresent.class == FalseClass) && !block_given? @j_del.java_method(:accept, [Java::boolean.java_class]).call(sessionPresent) return self end raise ArgumentError, "Invalid arguments when calling accept(#{sessionPresent})" end |
- (::VertxMqttServer::MqttAuth) auth
Returns the Authentication information as provided by the remote MQTT client
57 58 59 60 61 62 63 64 65 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 57 def auth if !block_given? if @cached_auth != nil return @cached_auth end return @cached_auth = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:auth, []).call(),::VertxMqttServer::MqttAuth) end raise ArgumentError, "Invalid arguments when calling auth()" end |
- (self) auto_keep_alive(isAutoKeepAlive = nil)
Enable/disable auto keep alive (sending ping response)
162 163 164 165 166 167 168 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 162 def auto_keep_alive(isAutoKeepAlive=nil) if (isAutoKeepAlive.class == TrueClass || isAutoKeepAlive.class == FalseClass) && !block_given? @j_del.java_method(:autoKeepAlive, [Java::boolean.java_class]).call(isAutoKeepAlive) return self end raise ArgumentError, "Invalid arguments when calling auto_keep_alive(#{isAutoKeepAlive})" end |
- (true, false) auto_keep_alive?
Returns the auto keep alive status (sending ping response)
170 171 172 173 174 175 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 170 def auto_keep_alive? if !block_given? return @j_del.java_method(:isAutoKeepAlive, []).call() end raise ArgumentError, "Invalid arguments when calling auto_keep_alive?()" end |
- (true, false) clean_session?
Returns true when clean session is requested by the remote MQTT client
97 98 99 100 101 102 103 104 105 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 97 def clean_session? if !block_given? if @cached_is_clean_session != nil return @cached_is_clean_session end return @cached_is_clean_session = @j_del.java_method(:isCleanSession, []).call() end raise ArgumentError, "Invalid arguments when calling clean_session?()" end |
- (String) client_identifier
Returns the client identifier as provided by the remote MQTT client
47 48 49 50 51 52 53 54 55 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 47 def client_identifier if !block_given? if @cached_client_identifier != nil return @cached_client_identifier end return @cached_client_identifier = @j_del.java_method(:clientIdentifier, []).call() end raise ArgumentError, "Invalid arguments when calling client_identifier()" end |
- (void) close
This method returns an undefined value.
Close the endpoint, so the connection with remote MQTT client
40 41 42 43 44 45 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 40 def close if !block_given? return @j_del.java_method(:close, []).call() end raise ArgumentError, "Invalid arguments when calling close()" end |
- (self) close_handler { ... }
Set a close handler. This will be called when the MQTT endpoint is closed
296 297 298 299 300 301 302 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 296 def close_handler if block_given? @j_del.java_method(:closeHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield }) return self end raise ArgumentError, "Invalid arguments when calling close_handler()" end |
- (true, false) connected?
Returns if the connection between remote client and local endpoint is established/open
177 178 179 180 181 182 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 177 def connected? if !block_given? return @j_del.java_method(:isConnected, []).call() end raise ArgumentError, "Invalid arguments when calling connected?()" end |
- (self) disconnect_handler { ... }
Set a disconnect handler on the MQTT endpoint. This handler is called when a DISCONNECT
message is received by the remote MQTT client
197 198 199 200 201 202 203 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 197 def disconnect_handler if block_given? @j_del.java_method(:disconnectHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield }) return self end raise ArgumentError, "Invalid arguments when calling disconnect_handler()" end |
- (self) exception_handler { ... }
Set an exception handler. This will be called when an error at protocol level happens
306 307 308 309 310 311 312 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 306 def exception_handler if block_given? @j_del.java_method(:exceptionHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.from_throwable(event)) })) return self end raise ArgumentError, "Invalid arguments when calling exception_handler()" end |
- (Fixnum) keep_alive_time_seconds
Returns the keep alive timeout (in seconds) specified by the remote MQTT client
107 108 109 110 111 112 113 114 115 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 107 def keep_alive_time_seconds if !block_given? if @cached_keep_alive_time_seconds != nil return @cached_keep_alive_time_seconds end return @cached_keep_alive_time_seconds = @j_del.java_method(:keepAliveTimeSeconds, []).call() end raise ArgumentError, "Invalid arguments when calling keep_alive_time_seconds()" end |
- (Fixnum) last_message_id
Returns the message identifier used for last published message
117 118 119 120 121 122 123 124 125 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 117 def if !block_given? if @cached_last_message_id != nil return @cached_last_message_id end return @cached_last_message_id = @j_del.java_method(:lastMessageId, []).call() end raise ArgumentError, "Invalid arguments when calling last_message_id()" end |
- (self) ping_handler { ... }
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.
286 287 288 289 290 291 292 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 286 def ping_handler if block_given? @j_del.java_method(:pingHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield }) return self end raise ArgumentError, "Invalid arguments when calling ping_handler()" end |
- (self) pong
Sends the PINGRESP message to the remote MQTT client
412 413 414 415 416 417 418 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 412 def pong if !block_given? @j_del.java_method(:pong, []).call() return self end raise ArgumentError, "Invalid arguments when calling pong()" end |
- (String) protocol_name
Returns the protocol name provided by the remote MQTT client
87 88 89 90 91 92 93 94 95 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 87 def protocol_name if !block_given? if @cached_protocol_name != nil return @cached_protocol_name end return @cached_protocol_name = @j_del.java_method(:protocolName, []).call() end raise ArgumentError, "Invalid arguments when calling protocol_name()" end |
- (Fixnum) protocol_version
Returns the protocol version required by the remote MQTT client
77 78 79 80 81 82 83 84 85 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 77 def protocol_version if !block_given? if @cached_protocol_version != nil return @cached_protocol_version end return @cached_protocol_version = @j_del.java_method(:protocolVersion, []).call() end raise ArgumentError, "Invalid arguments when calling protocol_version()" end |
- (self) publish(topic = nil, payload = nil, qosLevel = nil, isDup = nil, isRetain = nil)
Sends the PUBLISH message to the remote MQTT client
403 404 405 406 407 408 409 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 403 def publish(topic=nil,payload=nil,qosLevel=nil,isDup=nil,isRetain=nil) if topic.class == String && payload.class.method_defined?(:j_del) && qosLevel.class == Symbol && (isDup.class == TrueClass || isDup.class == FalseClass) && (isRetain.class == TrueClass || isRetain.class == FalseClass) && !block_given? @j_del.java_method(:publish, [Java::java.lang.String.java_class,Java::IoVertxCoreBuffer::Buffer.java_class,Java::IoNettyHandlerCodecMqtt::MqttQoS.java_class,Java::boolean.java_class,Java::boolean.java_class]).call(topic,payload.j_del,Java::IoNettyHandlerCodecMqtt::MqttQoS.valueOf(qosLevel.to_s),isDup,isRetain) return self end raise ArgumentError, "Invalid arguments when calling publish(#{topic},#{payload},#{qosLevel},#{isDup},#{isRetain})" end |
- (self) publish_acknowledge(publishMessageId = nil)
Sends the PUBACK message to the remote MQTT client
359 360 361 362 363 364 365 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 359 def publish_acknowledge(publishMessageId=nil) if publishMessageId.class == Fixnum && !block_given? @j_del.java_method(:publishAcknowledge, [Java::int.java_class]).call(publishMessageId) return self end raise ArgumentError, "Invalid arguments when calling publish_acknowledge(#{publishMessageId})" end |
- (self) publish_acknowledge_handler { ... }
Set the puback handler on the MQTT endpoint. This handler is called when a PUBACK
message is received by the remote MQTT client
241 242 243 244 245 246 247 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 241 def publish_acknowledge_handler if block_given? @j_del.java_method(:publishAcknowledgeHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event) })) return self end raise ArgumentError, "Invalid arguments when calling publish_acknowledge_handler()" end |
- (self) publish_auto_ack(isPublishAutoAck = nil)
Enable/disable publishing (in/out) auto acknowledge
145 146 147 148 149 150 151 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 145 def publish_auto_ack(isPublishAutoAck=nil) if (isPublishAutoAck.class == TrueClass || isPublishAutoAck.class == FalseClass) && !block_given? @j_del.java_method(:publishAutoAck, [Java::boolean.java_class]).call(isPublishAutoAck) return self end raise ArgumentError, "Invalid arguments when calling publish_auto_ack(#{isPublishAutoAck})" end |
- (true, false) publish_auto_ack?
Returns auto acknowledge status for publishing (in/out)
153 154 155 156 157 158 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 153 def publish_auto_ack? if !block_given? return @j_del.java_method(:isPublishAutoAck, []).call() end raise ArgumentError, "Invalid arguments when calling publish_auto_ack?()" end |
- (self) publish_complete(publishMessageId = nil)
Sends the PUBCOMP message to the remote MQTT client
389 390 391 392 393 394 395 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 389 def publish_complete(publishMessageId=nil) if publishMessageId.class == Fixnum && !block_given? @j_del.java_method(:publishComplete, [Java::int.java_class]).call(publishMessageId) return self end raise ArgumentError, "Invalid arguments when calling publish_complete(#{publishMessageId})" end |
- (self) publish_complete_handler { ... }
Set the pubcomp handler on the MQTT endpoint. This handler is called when a PUBCOMP
message is received by the remote MQTT client
274 275 276 277 278 279 280 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 274 def publish_complete_handler if block_given? @j_del.java_method(:publishCompleteHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event) })) return self end raise ArgumentError, "Invalid arguments when calling publish_complete_handler()" end |
- (self) publish_handler { ... }
Set the publish handler on the MQTT endpoint. This handler is called when a PUBLISH
message is received by the remote MQTT client
230 231 232 233 234 235 236 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 230 def publish_handler if block_given? @j_del.java_method(:publishHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxMqttServer::MqttPublishMessage)) })) return self end raise ArgumentError, "Invalid arguments when calling publish_handler()" end |
- (self) publish_received(publishMessageId = nil)
Sends the PUBREC message to the remote MQTT client
369 370 371 372 373 374 375 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 369 def publish_received(publishMessageId=nil) if publishMessageId.class == Fixnum && !block_given? @j_del.java_method(:publishReceived, [Java::int.java_class]).call(publishMessageId) return self end raise ArgumentError, "Invalid arguments when calling publish_received(#{publishMessageId})" end |
- (self) publish_received_handler { ... }
Set the pubrec handler on the MQTT endpoint. This handler is called when a PUBREC
message is received by the remote MQTT client
252 253 254 255 256 257 258 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 252 def publish_received_handler if block_given? @j_del.java_method(:publishReceivedHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event) })) return self end raise ArgumentError, "Invalid arguments when calling publish_received_handler()" end |
- (self) publish_release(publishMessageId = nil)
Sends the PUBREL message to the remote MQTT client
379 380 381 382 383 384 385 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 379 def publish_release(publishMessageId=nil) if publishMessageId.class == Fixnum && !block_given? @j_del.java_method(:publishRelease, [Java::int.java_class]).call(publishMessageId) return self end raise ArgumentError, "Invalid arguments when calling publish_release(#{publishMessageId})" end |
- (self) publish_release_handler { ... }
Set the pubrel handler on the MQTT endpoint. This handler is called when a PUBREL
message is received by the remote MQTT client
263 264 265 266 267 268 269 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 263 def publish_release_handler if block_given? @j_del.java_method(:publishReleaseHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event) })) return self end raise ArgumentError, "Invalid arguments when calling publish_release_handler()" end |
- (self) reject(returnCode = nil)
Sends the CONNACK message to the remote MQTT client rejecting the connection
request with specified return code. See #accept for accepting connection
328 329 330 331 332 333 334 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 328 def reject(returnCode=nil) if returnCode.class == Symbol && !block_given? @j_del.java_method(:reject, [Java::IoNettyHandlerCodecMqtt::MqttConnectReturnCode.java_class]).call(Java::IoNettyHandlerCodecMqtt::MqttConnectReturnCode.valueOf(returnCode.to_s)) return self end raise ArgumentError, "Invalid arguments when calling reject(#{returnCode})" end |
- (self) set_client_identifier(clientIdentifier = nil)
Set client identifier if not provided by the remote MQTT client (zero-bytes)
186 187 188 189 190 191 192 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 186 def set_client_identifier(clientIdentifier=nil) if clientIdentifier.class == String && !block_given? @j_del.java_method(:setClientIdentifier, [Java::java.lang.String.java_class]).call(clientIdentifier) return self end raise ArgumentError, "Invalid arguments when calling set_client_identifier(#{clientIdentifier})" end |
- (self) subscribe_acknowledge(subscribeMessageId = nil, grantedQoSLevels = nil)
Sends the SUBACK message to the remote MQTT client
339 340 341 342 343 344 345 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 339 def subscribe_acknowledge(subscribeMessageId=nil,grantedQoSLevels=nil) if subscribeMessageId.class == Fixnum && grantedQoSLevels.class == Array && !block_given? @j_del.java_method(:subscribeAcknowledge, [Java::int.java_class,Java::JavaUtil::List.java_class]).call(subscribeMessageId,grantedQoSLevels.map { |element| Java::IoNettyHandlerCodecMqtt::MqttQoS.valueOf(element.to_s) }) return self end raise ArgumentError, "Invalid arguments when calling subscribe_acknowledge(#{subscribeMessageId},#{grantedQoSLevels})" end |
- (self) subscribe_handler { ... }
Set a subscribe handler on the MQTT endpoint. This handler is called when a SUBSCRIBE
message is received by the remote MQTT client
208 209 210 211 212 213 214 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 208 def subscribe_handler if block_given? @j_del.java_method(:subscribeHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxMqttServer::MqttSubscribeMessage)) })) return self end raise ArgumentError, "Invalid arguments when calling subscribe_handler()" end |
- (void) subscription_auto_ack(isSubscriptionAutoAck = nil)
This method returns an undefined value.
Enable/disable subscription/unsubscription requests auto acknowledge
129 130 131 132 133 134 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 129 def subscription_auto_ack(isSubscriptionAutoAck=nil) if (isSubscriptionAutoAck.class == TrueClass || isSubscriptionAutoAck.class == FalseClass) && !block_given? return @j_del.java_method(:subscriptionAutoAck, [Java::boolean.java_class]).call(isSubscriptionAutoAck) end raise ArgumentError, "Invalid arguments when calling subscription_auto_ack(#{isSubscriptionAutoAck})" end |
- (true, false) subscription_auto_ack?
Returns true when auto acknowledge status for subscription/unsubscription requests
136 137 138 139 140 141 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 136 def subscription_auto_ack? if !block_given? return @j_del.java_method(:isSubscriptionAutoAck, []).call() end raise ArgumentError, "Invalid arguments when calling subscription_auto_ack?()" end |
- (self) unsubscribe_acknowledge(unsubscribeMessageId = nil)
Sends the UNSUBACK message to the remote MQTT client
349 350 351 352 353 354 355 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 349 def unsubscribe_acknowledge(unsubscribeMessageId=nil) if unsubscribeMessageId.class == Fixnum && !block_given? @j_del.java_method(:unsubscribeAcknowledge, [Java::int.java_class]).call(unsubscribeMessageId) return self end raise ArgumentError, "Invalid arguments when calling unsubscribe_acknowledge(#{unsubscribeMessageId})" end |
- (self) unsubscribe_handler { ... }
Set a unsubscribe handler on the MQTT endpoint. This handler is called when a UNSUBSCRIBE
message is received by the remote MQTT client
219 220 221 222 223 224 225 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 219 def unsubscribe_handler if block_given? @j_del.java_method(:unsubscribeHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxMqttServer::MqttUnsubscribeMessage)) })) return self end raise ArgumentError, "Invalid arguments when calling unsubscribe_handler()" end |
- (::VertxMqttServer::MqttWill) will
Returns the Will information as provided by the remote MQTT client
67 68 69 70 71 72 73 74 75 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_endpoint.rb', line 67 def will if !block_given? if @cached_will != nil return @cached_will end return @cached_will = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:will, []).call(),::VertxMqttServer::MqttWill) end raise ArgumentError, "Invalid arguments when calling will()" end |