StompFrame class

Represents a STOMP frame with command, headers, and body

Constructors

StompFrame.new({required String command, Map<String, String>? headers, Uint8List? body})

Properties

body Uint8List?
final
command String
final
hashCode int
The hash code for this object.
no setteroverride
headers Map<String, String>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy() StompFrame
Creates a copy of this frame
getBodyAsString() String?
Gets the body as a string (UTF-8 decoded)
getContentLength() int?
Gets the content length from headers
getHeader(String name) String?
Gets a header value
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeHeader(String name) → void
Removes a header
setBodyFromString(String content) → void
Sets the body from a string (UTF-8 encoded)
setHeader(String name, String value) → void
Sets a header value
toBytes() Uint8List
Converts the frame to bytes for transmission
toString() String
A string representation of this object.
override
validate() → void
Validates the frame according to STOMP specification

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromBytes(Uint8List data) StompFrame
Creates a STOMP frame from raw bytes