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.

    • Field Detail

      • __TYPE_ARG

        public static final io.vertx.lang.rx.TypeArg<StompClient> __TYPE_ARG
    • Constructor Detail

      • StompClient

        public StompClient​(StompClient delegate)
      • StompClient

        public StompClient​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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
      • connect

        public Future<StompClientConnection> connect​(int port,
                                                     String host)
        Connects to the server.
        Parameters:
        port - the server port
        host - the server host
        Returns:
        a future notified with the connection result
      • rxConnect

        public Single<StompClientConnection> rxConnect​(int port,
                                                       String host)
        Connects to the server.
        Parameters:
        port - the server port
        host - the server host
        Returns:
        a future notified with the connection result
      • connect

        public Future<StompClientConnection> connect()
        Connects to the server using the host and port configured in the client's options.
        Returns:
        a future notified with the connection result. A failure will be sent to the handler if a TCP level issue happen before the `CONNECTED` frame is received.
      • rxConnect

        public Single<StompClientConnection> rxConnect()
        Connects to the server using the host and port configured in the client's options.
        Returns:
        a future notified with the connection result. A failure will be sent to the handler if a TCP level issue happen before the `CONNECTED` frame is received.
      • errorFrameHandler

        public StompClient errorFrameHandler​(Handler<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​(Handler<Throwable> handler)
        Sets an exception handler notified for TCP-level errors.
        Parameters:
        handler - the handler
        Returns:
        the current StompClient
      • close

        public Future<Void> close()
        Closes the client.
        Returns:
      • rxClose

        public Completable rxClose()
        Closes the client.
        Returns:
      • 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.