Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StompServer

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.

Hierarchy

  • StompServer

Index

Methods

actualPort

  • actualPort(): number
  • 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 number

close

  • close(): PromiseLike<void>
  • close(completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Closes the server.

    Returns PromiseLike<void>

  • Closes the server.

    Parameters

    • completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

handler

isListening

  • isListening(): boolean
  • Checks whether or not the server is listening.

    Returns boolean

listen

  • 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 PromiseLike<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

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

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

    Returns 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: number
    • host: string

    Returns PromiseLike<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: number
    • host: string
    • handler: ((res: AsyncResult<StompServer>) => void) | Handler<AsyncResult<StompServer>>

    Returns StompServer

options

stompHandler

vertx

  • vertx(): Vertx
  • Returns Vertx

webSocketHandler

  • webSocketHandler(): ((res: ServerWebSocket) => void) | Handler<ServerWebSocket>
  • Gets the able to manage web socket connections. If the web socket bridge is disabled, it returns null.

    Returns ((res: ServerWebSocket) => void) | Handler<ServerWebSocket>

writingFrameHandler

  • 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

    Returns StompServer

Static create

  • Creates a StompServer based on the default Stomp Server implementation.

    Parameters

    Returns StompServer

  • Creates a StompServer based on the default Stomp Server implementation.

    Parameters

    • vertx: Vertx
    • netServer: NetServer

    Returns StompServer

  • Creates a StompServer based on the default Stomp Server implementation.

    Parameters

    Returns StompServer

  • Creates a StompServer based on the default Stomp Server implementation, and use the default options.

    Parameters

    • vertx: Vertx

    Returns StompServer

Generated using TypeDoc