StompService class
STOMP service that provides both client and server functionality for libp2p
Constructors
- StompService.new(Host _host, {StompServiceOptions? options})
Properties
-
clients
→ Map<
PeerId, StompClient> -
Active STOMP clients
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isStarted → bool
-
Whether the service is started
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- server → StompServer?
-
The STOMP server (if enabled)
no setter
Methods
-
broadcast(
{required String destination, required String body, String? contentType, Map< String, String> ? headers}) → Future<void> - Broadcasts a message to all connected peers
-
connect(
{required PeerId peerId, required String hostName, String? login, String? passcode, Duration? timeout}) → Future< StompClient> - Creates a new STOMP client connection to a peer
-
disconnect(
PeerId peerId) → Future< void> - Disconnects from a peer
-
disconnectAll(
) → Future< void> - Disconnects from all peers
-
getClient(
PeerId peerId) → StompClient? - Gets a client for a specific peer
-
getStats(
) → StompServiceStats - Gets statistics about the STOMP service
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(
{required PeerId peerId, required String destination, String? body, String? contentType, bool requestReceipt = false, Map< String, String> ? headers}) → Future<String?> - Sends a message to a destination on a specific peer
-
start(
) → Future< void> - Starts the STOMP service
-
stop(
) → Future< void> - Stops the STOMP service
-
subscribe(
{required PeerId peerId, required String destination, String? subscriptionId, StompAckMode ackMode = StompAckMode.auto, bool requestReceipt = false, Map< String, String> ? headers}) → Future<StompSubscription> - Subscribes to a destination on a specific peer
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited