StompFrame

zio.http.stomp.StompFrame
See theStompFrame companion object
final case class StompFrame(command: StompCommand, headers: Map[String, String] = ..., body: Option[Chunk[Byte]] = ...)

STOMP Frame as defined by STOMP Protocol Specification 1.2 https://stomp.github.io/stomp-specification-1.2.html

A STOMP frame consists of:

  • Command (mandatory)
  • Headers (optional key-value pairs)
  • Body (optional)

Value parameters

body

Optional body content

command

The STOMP command (e.g., CONNECT, SEND, MESSAGE, etc.)

headers

Headers as key-value pairs

Attributes

Companion
object
Source
StompFrame.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def encode: Chunk[Byte]

Encode the STOMP frame to bytes according to STOMP 1.2 specification

Encode the STOMP frame to bytes according to STOMP 1.2 specification

Attributes

Source
StompFrame.scala
def header(key: String): Option[String]

Get a header value by key

Get a header value by key

Attributes

Source
StompFrame.scala
def withBody(bodyBytes: Chunk[Byte]): StompFrame

Set the body

Set the body

Attributes

Source
StompFrame.scala
def withBody(bodyString: String): StompFrame

Set the body from a string

Set the body from a string

Attributes

Source
StompFrame.scala
def withHeader(key: String, value: String): StompFrame

Add or update a header

Add or update a header

Attributes

Source
StompFrame.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product