JsonRpc2Adapter class

A Adapter implementation that communicates via JSON RPC 2.0.

Inheritance

Constructors

JsonRpc2Adapter(Stream<StreamChannel<String>> clientStream, {bool isTrusted = false})

Properties

clientStream Stream<StreamChannel<String>>
A Stream of incoming clients, who can both send and receive string data.
final
hashCode int
The hash code for this object.
no setterinherited
isTrusted bool
If true, clients can connect through this endpoint, without providing a client ID.
final
onPublish Stream<PublishRequest>
Fires an event whenever a client tries to publish data.
no setteroverride
onSubscribe Stream<SubscriptionRequest>
Fires whenever a client tries to subscribe to an event.
no setteroverride
onUnsubscribe Stream<UnsubscriptionRequest>
Fires whenever a client cancels a subscription.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future
Disposes of this adapter.
override
isTrustedPublishRequest(PublishRequest request) bool
Determines if a given request comes from a trusted source.
override
isTrustedSubscriptionRequest(SubscriptionRequest request) bool
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() → void
Start listening for incoming clients.
override
toString() String
A string representation of this object.
inherited

Operators

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