public interface ProtonServer
Modifier and Type | Method and Description |
---|---|
int |
actualPort()
Gets the actual port being listened on.
|
void |
close()
Closes the server and any currently open connections.
|
void |
close(Handler<AsyncResult<Void>> handler)
Closes the server and any currently open connections, notifying the given handler when complete.
|
Handler<ProtonConnection> |
connectHandler()
Returns the current connectHandler.
|
ProtonServer |
connectHandler(Handler<ProtonConnection> handler)
The handler called when a new client connection is accepted.
|
static ProtonServer |
create(Vertx vertx)
Create a ProtonServer instance with the given Vertx instance.
|
static ProtonServer |
create(Vertx vertx,
ProtonServerOptions options)
Create a ProtonServer instance with the given Vertx instance and options.
|
ProtonServer |
listen()
Start listening on the host and port configured in the options used when creating the server.
|
ProtonServer |
listen(Handler<AsyncResult<ProtonServer>> handler)
Start listening on the host and port configured in the options used when creating the server, with the result
handler called when the operation completes.
|
ProtonServer |
listen(int port)
Start listening on the given port, and host interface "0.0.0.0".
|
ProtonServer |
listen(int port,
Handler<AsyncResult<ProtonServer>> handler)
Start listening on the given port and host interface "0.0.0.0", with the result handler called when the operation
completes.
|
ProtonServer |
listen(int port,
String host)
Start listening on the given port, and host interface.
|
ProtonServer |
listen(int port,
String host,
Handler<AsyncResult<ProtonServer>> handler)
Start listening on the given port and host interface, with the result handler called when the operation completes.
|
ProtonServer |
saslAuthenticatorFactory(ProtonSaslAuthenticatorFactory authenticatorFactory)
Sets the authenticator factory to be used by the server.
|
static ProtonServer create(Vertx vertx)
vertx
- the vertx instance to usestatic ProtonServer create(Vertx vertx, ProtonServerOptions options)
vertx
- the vertx instance to useoptions
- the options to useProtonServer connectHandler(Handler<ProtonConnection> handler)
handler
- the handlerHandler<ProtonConnection> connectHandler()
ProtonServer saslAuthenticatorFactory(ProtonSaslAuthenticatorFactory authenticatorFactory)
authenticatorFactory
- the factory to be used for creating authenticators.int actualPort()
ProtonServer listen(int port, String host, Handler<AsyncResult<ProtonServer>> handler)
port
- the port to listen on (may be 0 to auto-select port)host
- the host interface to listen on (may be "0.0.0.0" to indicate all interfaces).handler
- the result handlerProtonServer listen(int port, Handler<AsyncResult<ProtonServer>> handler)
port
- the port to listen on (may be 0 to auto-select port)handler
- the result handlerProtonServer listen(Handler<AsyncResult<ProtonServer>> handler)
handler
- the result handlerProtonServer listen(int port)
port
- the port to listen on (may be 0 to auto-select port)ProtonServer listen(int port, String host)
port
- the port to listen on (may be 0 to auto-select port)host
- the host interface to listen on (may be "0.0.0.0" to indicate all interfaces).ProtonServer listen()
void close()
void close(Handler<AsyncResult<Void>> handler)
handler
- the completion handlerCopyright © 2020 Eclipse. All rights reserved.