public class MqttServerImpl extends Object implements MqttServer
| Constructor and Description |
|---|
MqttServerImpl(Vertx vertx,
MqttServerOptions options) |
| Modifier and Type | Method and Description |
|---|---|
int |
actualPort()
The actual port the server is listening on.
|
void |
close()
Close the server.
|
void |
close(Handler<AsyncResult<Void>> completionHandler)
Close the server supplying an handler that will be called when the server is actually closed (or has failed).
|
MqttServer |
endpointHandler(Handler<MqttEndpoint> handler)
Set the endpoint handler for the server.
|
MqttServer |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler for the server, that will be called when an error happens independantly of an
accepted
MqttEndpoint, like a rejected connection |
MqttServer |
listen()
Start the server listening for incoming connections using the specified options
through the constructor
|
MqttServer |
listen(Handler<AsyncResult<MqttServer>> listenHandler)
Start the server listening for incoming connections using the specified options
through the constructor
|
MqttServer |
listen(int port)
Start the server listening for incoming connections on the port specified but on
"0.0.0.0" as host.
|
MqttServer |
listen(int port,
Handler<AsyncResult<MqttServer>> listenHandler)
Start the server listening for incoming connections on the port specified but on
"0.0.0.0" as host.
|
MqttServer |
listen(int port,
String host)
Start the server listening for incoming connections on the port and host specified
|
MqttServer |
listen(int port,
String host,
Handler<AsyncResult<MqttServer>> listenHandler)
Start the server listening for incoming connections on the port and host specified
It ignores any options specified through the constructor
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, createpublic MqttServerImpl(Vertx vertx, MqttServerOptions options)
public MqttServer listen()
MqttServerlisten in interface MqttServerpublic MqttServer listen(int port, String host)
MqttServerlisten in interface MqttServerport - the port to listen onhost - the host to listen onpublic MqttServer listen(int port)
MqttServerlisten in interface MqttServerport - the port to listen onpublic MqttServer listen(int port, Handler<AsyncResult<MqttServer>> listenHandler)
MqttServerlisten in interface MqttServerport - the port to listen onlistenHandler - handler called when the asynchronous listen call endspublic MqttServer listen(Handler<AsyncResult<MqttServer>> listenHandler)
MqttServerlisten in interface MqttServerlistenHandler - handler called when the asynchronous listen call endspublic MqttServer listen(int port, String host, Handler<AsyncResult<MqttServer>> listenHandler)
MqttServerlisten in interface MqttServerport - the port to listen onhost - the host to listen onlistenHandler - handler called when the asynchronous listen call endspublic MqttServer endpointHandler(Handler<MqttEndpoint> handler)
MqttServerendpointHandler in interface MqttServerhandler - the endpoint handlerpublic MqttServer exceptionHandler(Handler<Throwable> handler)
MqttServerMqttEndpoint, like a rejected connectionexceptionHandler in interface MqttServerhandler - the exception handlerpublic int actualPort()
MqttServeractualPort in interface MqttServerpublic void close()
MqttServerThe close happens asynchronously and the server may not be closed until some time after the call has returned.
close in interface MqttServerpublic void close(Handler<AsyncResult<Void>> completionHandler)
MqttServerclose in interface MqttServercompletionHandler - the handler called on completionCopyright © 2020. All rights reserved.