LspEndpoint class abstract

Transport-agnostic JSON-RPC 2.0 endpoint. Subclasses supply the wire by implementing writeMessage and feeding decoded messages to handleMessage.

Implementers

Constructors

LspEndpoint()

Properties

done Future<void>
Completes when the endpoint closes.
no setter
hashCode int
The hash code for this object.
no setterinherited
onNotification NotificationHandler?
getter/setter pair
onRequest RequestHandler?
getter/setter pair
onResponse ResponseHandler?
Invoked for a JSON-RPC response (a message with an id but no method), i.e. the peer's reply to a request this endpoint sent. Set by LspClient; left null by a pure server, which never issues requests.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

handleMessage(Object? message) Future<void>
Routes one decoded incoming JSON-RPC message.
listen() → void
Begins consuming input. No-op for push-based endpoints (e.g. web).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendNotification(String method, Object? params) → void
Sends a notification to the peer.
toString() String
A string representation of this object.
inherited
writeMessage(Map<String, Object?> message) → void
Writes a fully-formed JSON-RPC message to the wire.

Operators

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