Server class

Instances of the class Server manage a server process, and facilitate communication to and from the server.

Clients may not extend, implement or mix-in this class.

Constructors

Server({ServerListener? listener, Process? process, bool stdioPassthrough = false})

Properties

hashCode int
The hash code for this object.
no setterinherited
listener ServerListener?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

errorProcessor(String line, NotificationProcessor? notificationProcessor) → void
If the implementation of ServerBase captures an error stream, it can use this to forward the errors to listener and stderr if appropriate.
inherited
kill({String reason = 'none'}) Future<int>
Force kill the server. Returns exit code future.
listenToOutput({NotificationProcessor? notificationProcessor}) → void
Start listening to output from the server, and deliver notifications to notificationProcessor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
outputProcessor(String line, NotificationProcessor? notificationProcessor) → void
Handle a (possibly) json encoded object, completing the Completer in _pendingCommands corresponding to the response. Reports problems in decoding or message synchronization using listener, and replicates raw data to stdout as appropriate.
inherited
send(String method, Map<String, Object?>? params) Future<Map<String, Object?>?>
Send a command to the server. An 'id' will be automatically assigned. The returned Future will be completed when the server acknowledges the command with a response. If the server acknowledges the command with a normal (non-error) response, the future will be completed with the 'result' field from the response. If the server acknowledges the command with an error response, the future will be completed with an error.
sendCommandWith(String method, Map<String, Object?>? params, CommandSender sendWith) Future<Map<String, Object?>?>
Encodes a request for transmission and sends it as a utf8 encoded byte string with sendWith.
inherited
start({String? clientId, String? clientVersion, int? diagnosticPort, String? instrumentationLogFile, bool profileServer = false, String? sdkPath, String? serverPath, int? servicesPort, bool suppressAnalytics = true, bool useAnalysisHighlight2 = false, bool enableAsserts = false, String? dartBinary}) Future
Start the server.
stop({Duration? timeLimit}) Future<int>
Attempt to gracefully shutdown the server. If that fails, then kill the process.
toString() String
A string representation of this object.
inherited

Operators

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