Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Frame

Represents a STOMP frame. STOMP frames are structured as follows. It starts by a command, followed by a set of headers. Then the frame may have a body and is finished by a 0 byte. This class represents this structure and provide access to the different parts.

This class is NOT thread-safe.

Hierarchy

  • Frame

Index

Constructors

constructor

  • Returns Frame

  • Parameters

    Returns Frame

Methods

addHeader

  • addHeader(key: string, headers: string): Frame
  • Sets the headers of the frames.

    Parameters

    • key: string
    • headers: string

    Returns Frame

getAck

  • getAck(): string
  • Gets the value of the ack header.

    Returns string

getBody

  • getBody(): Buffer
  • Sets the body of the frame.

    Returns Buffer

getBodyAsString

  • getBodyAsString(): string
  • Gets the body of the frames as a String encoded in the frame encoding.

    Returns string

getCommand

  • Sets the frame command.

    Returns Command

getDestination

  • getDestination(): string
  • Returns string

getHeaders

  • getHeaders(): {}
  • Sets the headers of the frames.

    Returns {}

    • [key: string]: string

getId

  • getId(): string
  • Returns string

getReceipt

  • getReceipt(): string
  • Returns string

getTransaction

  • getTransaction(): string
  • Returns string

setBody

  • setBody(body: Buffer): Frame
  • Sets the body of the frame.

    Parameters

    • body: Buffer

    Returns Frame

setCommand

  • Sets the frame command.

    Parameters

    Returns Frame

setDestination

  • setDestination(destination: string): Frame
  • Parameters

    • destination: string

    Returns Frame

setHeaders

  • setHeaders(headers: {}): Frame
  • Sets the headers of the frames.

    Parameters

    • headers: {}
      • [key: string]: string

    Returns Frame

setId

  • setId(id: string): Frame
  • Parameters

    • id: string

    Returns Frame

setTransaction

  • setTransaction(transaction: string): Frame
  • Parameters

    • transaction: string

    Returns Frame

toJson

  • toJson(): {}
  • Returns {}

    • [key: string]: any

Generated using TypeDoc