IoWebSocketsService<Id, Data> class
- Inheritance
-
- Object
- Service<
Id, Data?> - WebSocketsService<
Id, Data> - IoWebSocketsService
Constructors
- IoWebSocketsService.new(WebSocketChannel? socket, WebSockets app, String uri, Type? type)
Properties
- app → BaseWebSocketClient
-
The BaseWebSocketClient that spawned this service.
finalinherited
-
deserializer
→ AngelDeserializer<
Data> ? -
Used to deserialize JSON into typed data.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onAllEvents
→ Stream<
WebSocketEvent> -
Fired on all events.
no setterinherited
-
onCreated
→ Stream<
Data?> -
Fired on
created
events.no setterinherited -
onIndexed
→ Stream<
List< Data?> > -
Fired on
index
events.no setterinherited -
onModified
→ Stream<
Data?> -
Fired on
modified
events.no setterinherited -
onRead
→ Stream<
Data?> -
Fired on
read
events.no setterinherited -
onRemoved
→ Stream<
Data?> -
Fired on
removed
events.no setterinherited -
onUpdated
→ Stream<
Data?> -
Fired on
updated
events.no setterinherited - path → String
-
The service path to listen to.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- socket → WebSocketChannel?
-
The
WebSocketChannel
to listen to, and send data across.finalinherited - type → Type?
-
final
Methods
-
close(
) → Future -
inherited
-
create(
Data? data, [Map< String, dynamic> ? params]) → Future<Data?> -
Creates a resource.
inherited
-
deserialize(
dynamic x) → Data? -
Deserializes data from a WebSocketEvent.
inherited
-
index(
[Map< String, dynamic> ? params]) → Future<List< Data> ?> -
Retrieves all resources.
inherited
-
listen(
) → void -
Starts listening for events.
inherited
-
map<
U> (U encoder(Data?), Data? decoder(U)) → Service< Id, U> -
Creates a Service that wraps over this one, and maps input and output using two converter functions.
inherited
-
modify(
Id id, Data? data, [Map< String, dynamic> ? params]) → Future<Data?> -
Modifies a resource.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
Id id, [Map< String, dynamic> ? params]) → Future<Data?> -
Retrieves the desired resource.
inherited
-
remove(
Id id, [Map< String, dynamic> ? params]) → Future<Data?> -
Removes the given resource.
inherited
-
send(
WebSocketAction action) → void -
Sends the given
action
on the socket.inherited -
serialize(
WebSocketAction action) → dynamic -
Serializes an
action
to be sent over a WebSocket.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
transformEvent(
WebSocketEvent event) → WebSocketEvent< Data> -
Deserializes the contents of an
event
.inherited -
update(
Id id, Data? data, [Map< String, dynamic> ? params]) → Future<Data?> -
Overwrites a resource.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited