io.vertx.rxjava.ext.stomp

## Class StompServer

- java.lang.Object
- - io.vertx.rxjava.ext.stomp.StompServer

-     public class StompServer
      extends Object

  Defines a STOMP server. STOMP servers delegates to a `StompServerHandler` that let customize the behavior of the server. By default, it uses a handler compliant with the STOMP specification, but let you change anything.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypeArg<StompServer>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StompServer(StompServer delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `actualPort()` Gets the port on which the server is listening.
    `void` | `close()` Closes the server.
    `void` | `close(Handler<AsyncResult<Void>> completionHandler)` Closes the server.
    `rx.Observable<Void>` | `closeObservable()` Deprecated. use `rxClose()` instead
    `static StompServer` | `create(Vertx vertx)` Creates a `StompServer` based on the default Stomp Server implementation, and use the default options.
    `static StompServer` | `create(Vertx vertx, NetServer netServer)` Creates a `StompServer` based on the default Stomp Server implementation.
    `static StompServer` | `create(Vertx vertx, NetServer net, StompServerOptions options)` Creates a `StompServer` based on the default Stomp Server implementation.
    `static StompServer` | `create(Vertx vertx, StompServerOptions options)` Creates a `StompServer` based on the default Stomp Server implementation.
    `StompServer` | `getDelegate()`
    `StompServer` | `handler(StompServerHandler handler)` Configures the `StompServerHandler`.
    `boolean` | `isListening()` Checks whether or not the server is listening.
    `StompServer` | `listen()` Connects the STOMP server to the port / host configured in the server options.
    `StompServer` | `listen(Handler<AsyncResult<StompServer>> handler)` Connects the STOMP server default port (61613) and network interface (`0.0.0.0`).
    `StompServer` | `listen(int port)` Connects the STOMP server to the given port.
    `StompServer` | `listen(int port, Handler<AsyncResult<StompServer>> handler)` Connects the STOMP server to the given port.
    `StompServer` | `listen(int port, String host)` Connects the STOMP server to the given port / interface.
    `StompServer` | `listen(int port, String host, Handler<AsyncResult<StompServer>> handler)` Connects the STOMP server to the given port / interface.
    `rx.Observable<StompServer>` | `listenObservable()` Deprecated. use `rxListen()` instead
    `rx.Observable<StompServer>` | `listenObservable(int port)` Deprecated. use `rxListen()` instead
    `rx.Observable<StompServer>` | `listenObservable(int port, String host)` Deprecated. use `rxListen()` instead
    `static StompServer` | `newInstance(StompServer arg)`
    `StompServerOptions` | `options()`
    `rx.Single<Void>` | `rxClose()` Closes the server.
    `rx.Single<StompServer>` | `rxListen()` Connects the STOMP server default port (61613) and network interface (`0.0.0.0`).
    `rx.Single<StompServer>` | `rxListen(int port)` Connects the STOMP server to the given port.
    `rx.Single<StompServer>` | `rxListen(int port, String host)` Connects the STOMP server to the given port / interface.
    `StompServerHandler` | `stompHandler()`
    `Vertx` | `vertx()`
    `Handler<ServerWebSocket>` | `webSocketHandler()` Gets the able to manage web socket connections.
    `StompServer` | `writingFrameHandler(Handler<ServerFrame> handler)` Configures the handler that is invoked every time a frame is going to be written to the "wire".

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final TypeArg<StompServer> __TYPE_ARG

  - ### Constructor Detail

    - #### StompServer

          public StompServer(StompServer delegate)

  - ### Method Detail

    - #### getDelegate

          public StompServer getDelegate()

    - #### create

          public static StompServer create(Vertx vertx,
                                           StompServerOptions options)

      Creates a `StompServer` based on the default Stomp Server implementation.
      Parameters:
        `vertx` - the vert.x instance to use
        `options` - the server options
      Returns:
        the created `StompServer`

    - #### create

          public static StompServer create(Vertx vertx,
                                           NetServer netServer)

      Creates a `StompServer` based on the default Stomp Server implementation.
      Parameters:
        `vertx` - the vert.x instance to use
        `netServer` - the Net server used by the STOMP server
      Returns:
        the created `StompServer`

    - #### create

          public static StompServer create(Vertx vertx,
                                           NetServer net,
                                           StompServerOptions options)

      Creates a `StompServer` based on the default Stomp Server implementation.
      Parameters:
        `vertx` - the vert.x instance to use
        `net` - the Net server used by the STOMP server
        `options` - the server options
      Returns:
        the created `StompServer`

    - #### create

          public static StompServer create(Vertx vertx)

      Creates a `StompServer` based on the default Stomp Server implementation, and use the default options.
      Parameters:
        `vertx` - the vert.x instance to use
      Returns:
        the created `StompServer`

    - #### handler

          public StompServer handler(StompServerHandler handler)

      Configures the `StompServerHandler`. You must calls this method before calling the `listen(int)` method.
      Parameters:
        `handler` - the handler
      Returns:
        the current `StompServer`

    - #### listen

          public StompServer listen(int port)

      Connects the STOMP server to the given port.
      Parameters:
        `port` - the port
      Returns:
        the current `StompServer`

    - #### listen

          public StompServer listen(int port,
                                    String host)

      Connects the STOMP server to the given port / interface.
      Parameters:
        `port` - the port
        `host` - the interface
      Returns:
        the current `StompServer`

    - #### listen

          public StompServer listen()

      Connects the STOMP server to the port / host configured in the server options.
      Returns:
        the current `StompServer`

    - #### listen

          public StompServer listen(Handler<AsyncResult<StompServer>> handler)

      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
      Returns:
        the current `StompServer`

    - #### listenObservable

          @Deprecated
          public rx.Observable<StompServer> listenObservable()

      Deprecated. use `rxListen()` instead
      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.
      Returns:

    - #### rxListen

          public rx.Single<StompServer> rxListen()

      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.
      Returns:

    - #### listen

          public StompServer listen(int port,
                                    Handler<AsyncResult<StompServer>> handler)

      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
      Returns:
        the current `StompServer`

    - #### listenObservable

          @Deprecated
          public rx.Observable<StompServer> listenObservable(int port)

      Deprecated. use `rxListen()` instead
      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
      Returns:

    - #### rxListen

          public rx.Single<StompServer> rxListen(int port)

      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
      Returns:

    - #### listen

          public StompServer listen(int port,
                                    String host,
                                    Handler<AsyncResult<StompServer>> handler)

      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
      Returns:
        the current `StompServer`

    - #### listenObservable

          @Deprecated
          public rx.Observable<StompServer> listenObservable(int port,
                                                                         String host)

      Deprecated. use `rxListen()` instead
      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
      Returns:

    - #### rxListen

          public rx.Single<StompServer> rxListen(int port,
                                                 String host)

      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
      Returns:

    - #### close

          public void close(Handler<AsyncResult<Void>> completionHandler)

      Closes the server.
      Parameters:
        `completionHandler` - handler called once the server has been stopped

    - #### closeObservable

          @Deprecated
          public rx.Observable<Void> closeObservable()

      Deprecated. use `rxClose()` instead
      Closes the server.
      Returns:

    - #### rxClose

          public rx.Single<Void> rxClose()

      Closes the server.
      Returns:

    - #### close

          public void close()

      Closes the server.

    - #### isListening

          public boolean isListening()

      Checks whether or not the server is listening.
      Returns:
        `true` if the server is listening, `false` otherwise

    - #### actualPort

          public int actualPort()

      Gets the port on which the server is listening.

      This is useful if you bound the server specifying 0 as port number signifying an ephemeral port.
      Returns:
        the port

    - #### options

          public StompServerOptions options()

      Returns:
        the server options

    - #### vertx

          public Vertx vertx()

      Returns:
        the instance of vert.x used by the server.

    - #### stompHandler

          public StompServerHandler stompHandler()

      Returns:
        the `StompServerHandler` used by this server.

    - #### webSocketHandler

          public Handler<ServerWebSocket> webSocketHandler()

      Gets the able to manage web socket connections. If the web socket bridge is disabled, it returns `null`.
      Returns:
        the handler that can be passed to `HttpServer.websocketHandler(io.vertx.core.Handler<io.vertx.rxjava.core.http.ServerWebSocket>)`.

    - #### writingFrameHandler

          public StompServer writingFrameHandler(Handler<ServerFrame> handler)

      Configures the handler that is invoked every time a frame is going to be written to the "wire". It lets you log the frames, but also adapt the frame if needed.
      Parameters:
        `handler` - the handler, must not be `null`
      Returns:
        the current `StompServer`

    - #### newInstance

          public static StompServer newInstance(StompServer arg)

Copyright © 2017. All rights reserved.