Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StompClient

STOMP(WebSocket) Protocol Client.

Hierarchy

  • StompClient

Implements

Index

Constructors

constructor

  • new StompClient(config: { heartbeatIn?: number; heartbeatOut?: number; isDebugEnabled?: boolean; password?: string; presetServer?: 0 | 1; retryTime?: number; serverURL?: string; username?: string }): StompClient
  • Stomp Client Constructor

    description

    This constructor will create an instance of STOMP.js Websocket Connection

    Parameters

    • config: { heartbeatIn?: number; heartbeatOut?: number; isDebugEnabled?: boolean; password?: string; presetServer?: 0 | 1; retryTime?: number; serverURL?: string; username?: string }

      Client Config

      • Optional heartbeatIn?: number
      • Optional heartbeatOut?: number
      • Optional isDebugEnabled?: boolean
      • Optional password?: string
      • Optional presetServer?: 0 | 1
      • Optional retryTime?: number
      • Optional serverURL?: string
      • Optional username?: string

    Returns StompClient

Properties

client

client: Client

heartbeatIn

heartbeatIn: number = 5000

heartbeatOut

heartbeatOut: number = 5000

isDebugEnabled

isDebugEnabled: boolean = false

password

password: string = ""

presetServer

presetServer: number = 0

retryTime

retryTime: number = 5000

serverURL

serverURL: string = ""

username

username: string = ""

Methods

activate

  • activate(): void

deactivate

  • deactivate(): void

isConnected

  • isConnected(): boolean

onConnect

onError

onWebSocketClose

subscribe

  • subscribe(channel: string, cb: messageCallbackType): StompSubscription
  • Subscribe to a channel/topic/exchange

    Parameters

    • channel: string

      the channel/topic/exchange name

    • cb: messageCallbackType

      Callback Function

    Returns StompSubscription

Generated using TypeDoc