class MqttServer extends AnyRef
An MQTT server
You can accept incoming MQTT connection requests providing a io.vertx.scala.mqtt.MqttServer#endpointHandler. As the requests arrive, the handler will be called with an instance of io.vertx.scala.mqtt.MqttEndpoint in order to manage the communication with the remote MQTT client.
- Alphabetic
- By Inheritance
- MqttServer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new MqttServer(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
actualPort(): Int
The actual port the server is listening on.
The actual port the server is listening on. This is useful if you bound the server specifying 0 as port number signifying an ephemeral port * @return the actual port the server is listening on.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(completionHandler: Handler[AsyncResult[Unit]]): Unit
Close the server supplying an handler that will be called when the server is actually closed (or has failed).
Close the server supplying an handler that will be called when the server is actually closed (or has failed). * @param completionHandler the handler called on completion
-
def
close(): Unit
Close the server.
Close the server.
The close happens asynchronously and the server may not be closed until some time after the call has returned.
-
def
closeFuture(): Future[Unit]
Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
endpointHandler(handler: Handler[MqttEndpoint]): MqttServer
Set the endpoint handler for the server.
Set the endpoint handler for the server. If an MQTT client connect to the server a new MqttEndpoint instance will be created and passed to the handler * @param handler the endpoint handler
- returns
a reference to this, so the API can be used fluently
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exceptionHandler(handler: Handler[Throwable]): MqttServer
Set an exception handler for the server, that will be called when an error happens independantly of an accepted io.vertx.scala.mqtt.MqttEndpoint, like a rejected connection * @param handler the exception handler
Set an exception handler for the server, that will be called when an error happens independantly of an accepted io.vertx.scala.mqtt.MqttEndpoint, like a rejected connection * @param handler the exception handler
- returns
a reference to this, so the API can be used fluently
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
listen(listenHandler: Handler[AsyncResult[MqttServer]]): MqttServer
Start the server listening for incoming connections using the specified options through the constructor * @param listenHandler handler called when the asynchronous listen call ends
Start the server listening for incoming connections using the specified options through the constructor * @param listenHandler handler called when the asynchronous listen call ends
- returns
a reference to this, so the API can be used fluently
-
def
listen(port: Int, listenHandler: Handler[AsyncResult[MqttServer]]): MqttServer
Start the server listening for incoming connections on the port specified but on "0.0.0.0" as host.
Start the server listening for incoming connections on the port specified but on "0.0.0.0" as host. It ignores any options specified through the constructor * @param port the port to listen on
- listenHandler
handler called when the asynchronous listen call ends
- returns
a reference to this, so the API can be used fluently
-
def
listen(port: Int): MqttServer
Start the server listening for incoming connections on the port specified but on "0.0.0.0" as host.
Start the server listening for incoming connections on the port specified but on "0.0.0.0" as host. It ignores any options specified through the constructor * @param port the port to listen on
- returns
a reference to this, so the API can be used fluently
-
def
listen(port: Int, host: String, listenHandler: Handler[AsyncResult[MqttServer]]): MqttServer
Start the server listening for incoming connections on the port and host specified It ignores any options specified through the constructor * @param port the port to listen on
Start the server listening for incoming connections on the port and host specified It ignores any options specified through the constructor * @param port the port to listen on
- host
the host to listen on
- listenHandler
handler called when the asynchronous listen call ends
- returns
a reference to this, so the API can be used fluently
-
def
listen(port: Int, host: String): MqttServer
Start the server listening for incoming connections on the port and host specified * @param port the port to listen on
Start the server listening for incoming connections on the port and host specified * @param port the port to listen on
- host
the host to listen on
- returns
a reference to this, so the API can be used fluently
-
def
listen(): MqttServer
Start the server listening for incoming connections using the specified options through the constructor * @return a reference to this, so the API can be used fluently
-
def
listenFuture(): Future[MqttServer]
Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
listenFuture(port: Int): Future[MqttServer]
Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
listenFuture(port: Int, host: String): Future[MqttServer]
Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )