Class StompClient


  • public class StompClient
    extends Object
    Defines a STOMP client.

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

    • Constructor Detail

      • StompClient

        public StompClient​(io.vertx.ext.stomp.StompClient delegate)
      • StompClient

        public StompClient​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getDelegate

        public io.vertx.ext.stomp.StompClient getDelegate()
      • create

        public static StompClient create​(Vertx vertx)
        Creates a StompClient using the default implementation.
        Parameters:
        vertx - the vert.x instance to use
        Returns:
        the created StompClient
      • create

        public static StompClient create​(Vertx vertx,
                                         io.vertx.ext.stomp.StompClientOptions options)
        Creates a StompClient using the default implementation.
        Parameters:
        vertx - the vert.x instance to use
        options - the options
        Returns:
        the created StompClient
      • connect

        public StompClient connect​(int port,
                                   String host,
                                   io.vertx.core.Handler<io.vertx.core.AsyncResult<StompClientConnection>> resultHandler)
        Connects to the server.
        Parameters:
        port - the server port
        host - the server host
        resultHandler - handler called with the connection result
        Returns:
        the current StompClient
      • connect

        public StompClient connect​(int port,
                                   String host)
        Connects to the server.
        Parameters:
        port - the server port
        host - the server host
        Returns:
        the current StompClient
      • rxConnect

        public rx.Single<StompClientConnection> rxConnect​(int port,
                                                          String host)
        Connects to the server.
        Parameters:
        port - the server port
        host - the server host
        Returns:
        the current StompClient
      • connect

        public StompClient connect​(NetClient net,
                                   io.vertx.core.Handler<io.vertx.core.AsyncResult<StompClientConnection>> resultHandler)
        Connects to the server.
        Parameters:
        net - the NET client to use
        resultHandler - handler called with the connection result
        Returns:
        the current StompClient
      • connect

        public StompClient connect​(int port,
                                   String host,
                                   NetClient net,
                                   io.vertx.core.Handler<io.vertx.core.AsyncResult<StompClientConnection>> resultHandler)
        Connects to the server.
        Parameters:
        port - the server port
        host - the server host
        net - the NET client to use
        resultHandler - handler called with the connection result
        Returns:
        the current StompClient
      • connect

        public StompClient connect​(int port,
                                   String host,
                                   NetClient net)
        Connects to the server.
        Parameters:
        port - the server port
        host - the server host
        net - the NET client to use
        Returns:
        the current StompClient
      • rxConnect

        public rx.Single<StompClientConnection> rxConnect​(int port,
                                                          String host,
                                                          NetClient net)
        Connects to the server.
        Parameters:
        port - the server port
        host - the server host
        net - the NET client to use
        Returns:
        the current StompClient
      • connect

        public StompClient connect()
        Connects to the server using the host and port configured in the client's options.
        Returns:
        the current StompClient
      • rxConnect

        public rx.Single<StompClientConnection> rxConnect()
        Connects to the server using the host and port configured in the client's options.
        Returns:
        the current StompClient
      • errorFrameHandler

        public StompClient errorFrameHandler​(io.vertx.core.Handler<io.vertx.ext.stomp.Frame> handler)
        A general error frame handler. It can be used to catch ERROR frame emitted during the connection process (wrong authentication). This error handler will be pass to all StompClientConnection created from this client. Obviously, the client can override it when the connection is established.
        Parameters:
        handler - the handler
        Returns:
        the current StompClient
      • exceptionHandler

        public StompClient exceptionHandler​(io.vertx.core.Handler<Throwable> handler)
        Sets an exception handler notified for TCP-level errors.
        Parameters:
        handler - the handler
        Returns:
        the current StompClient
      • close

        public void close()
        Closes the client.
      • options

        public io.vertx.ext.stomp.StompClientOptions options()
        Returns:
        the client's options.
      • vertx

        public Vertx vertx()
        Returns:
        the vert.x instance used by the client.
      • isClosed

        public boolean isClosed()
        Returns:
        whether or not the client is connected to the server.
      • newInstance

        public static StompClient newInstance​(io.vertx.ext.stomp.StompClient arg)