Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StompClient

Defines a STOMP client.

Hierarchy

  • StompClient

Index

Methods

close

  • close(): void
  • Closes the client.

    Returns void

connect

  • Connects to the server.

    Parameters

    • port: number
    • host: string

    Returns PromiseLike<StompClientConnection>

  • Connects to the server.

    Parameters

    Returns StompClient

  • Connects to the server.

    Parameters

    • net: NetClient

    Returns PromiseLike<StompClientConnection>

  • Connects to the server.

    Parameters

    Returns StompClient

  • Connects to the server.

    Parameters

    • port: number
    • host: string
    • net: NetClient

    Returns PromiseLike<StompClientConnection>

  • Connects to the server.

    Parameters

    Returns StompClient

  • Connects to the server using the host and port configured in the client's options.

    Returns PromiseLike<StompClientConnection>

  • Connects to the server using the host and port configured in the client's options.

    Parameters

    Returns StompClient

errorFrameHandler

  • 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: ((res: Frame) => void) | Handler<Frame>

    Returns StompClient

exceptionHandler

  • exceptionHandler(handler: ((res: Throwable) => void) | Handler<Throwable>): StompClient
  • Sets an exception handler notified for TCP-level errors.

    Parameters

    • handler: ((res: Throwable) => void) | Handler<Throwable>

    Returns StompClient

isClosed

  • isClosed(): boolean
  • Returns boolean

options

receivedFrameHandler

  • Configures a received handler that gets notified when a STOMP frame is received by the client. This handler can be used for logging, debugging or ad-hoc behavior. The frame can still be modified at the time.

    When a connection is created, the handler is used as {@link StompClientConnection#receivedFrameHandler}.

    Parameters

    • handler: ((res: Frame) => void) | Handler<Frame>

    Returns StompClient

vertx

  • vertx(): Vertx
  • Returns Vertx

writingFrameHandler

  • Configures a writing handler that gets notified when a STOMP frame is written on the wire. This handler can be used for logging, debugging or ad-hoc behavior. The frame can still be modified at the time.

    When a connection is created, the handler is used as {@link StompClientConnection#writingFrameHandler}.

    Parameters

    • handler: ((res: Frame) => void) | Handler<Frame>

    Returns StompClient

Static create

  • Creates a StompClient using the default implementation.

    Parameters

    • vertx: Vertx

    Returns StompClient

  • Creates a StompClient using the default implementation.

    Parameters

    Returns StompClient

Generated using TypeDoc