vertx / io.vertx.ext.stomp / StompServer / listen

listen

abstract fun listen(port: Int): StompServer

Connects the STOMP server to the given port.

Parameters

port - the port

Return
the current StompServer

abstract fun listen(port: Int, host: String): StompServer

Connects the STOMP server to the given port / interface.

Parameters

port - the port

host - the interface

Return
the current StompServer

abstract fun listen(): StompServer

Connects the STOMP server to the port / host configured in the server options.

Return
the current StompServer

abstract fun listen(handler: Handler<AsyncResult<StompServer>>): StompServer

Connects the STOMP server default port (61613) and network interface (0.0.0.0). Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.

Parameters

handler - the handler to call with the result

Return
the current StompServer

abstract fun listen(port: Int, handler: Handler<AsyncResult<StompServer>>): StompServer

Connects the STOMP server to the given port. This method use the default host (0.0.0.0). Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.

Parameters

port - the port

handler - the handler to call with the result

Return
the current StompServer

abstract fun listen(port: Int, host: String, handler: Handler<AsyncResult<StompServer>>): StompServer

Connects the STOMP server to the given port / interface. Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.

Parameters

port - the port

host - the host / interface

handler - the handler to call with the result

Return
the current StompServer