Dispatcher class

Dispatcher for handling Bayeux protocol messages

Constructors

Dispatcher.new(String _endpoint, Map<String, dynamic> options)

Properties

clientId String?
Get client ID
no setter
errorStream Stream<FayeError>
Get error stream
no setter
extension → dynamic
Get extension for message processing
no setter
hashCode int
The hash code for this object.
no setterinherited
messageStream Stream<Map<String, dynamic>>
Get message stream
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state int
Get current state
no setter
stateStream Stream<int>
Get state change stream
no setter
statistics Map<String, dynamic>
Get dispatcher statistics
no setter
transport Transport?
Get current transport
no setter

Methods

clearClientId() → void
Clear current clientId to prepare for a fresh handshake
close() Future<void>
Close dispatcher
connect({Map<String, String>? headers}) Future<void>
Connect to server
disconnect() Future<void>
Disconnect from server
extractBayeuxMessage(dynamic response) Map<String, dynamic>
Extract the first message from a Bayeux response Bayeux responses can be either a single object or an array of objects
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publish(String channel, dynamic data) Future<Map<String, dynamic>>
Send publish message
rehandshake({Map<String, String>? headers}) Future<void>
Force a new handshake without tearing down the transport
sendConnect() Future<void>
Send connect message
setExtension(dynamic extension) → void
Set extension for message processing
setTransport(String transportName) → void
Set transport
subscribe(String channel) Future<Map<String, dynamic>>
Send subscribe message
toString() String
A string representation of this object.
inherited
unsubscribe(String channel) Future<Map<String, dynamic>>
Send unsubscribe message

Operators

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