AcpHttpServer class final
Adapter-neutral experimental ACP HTTP/SSE server.
Adapters translate their platform request into AcpHttpRequest and stream the returned AcpHttpResponse with backpressure. Connection and session IDs are routing values only; authentication and authorization belong in the host adapter or application.
Constructors
- AcpHttpServer({required AcpServerConnectionFactory createConnection, AcpServerConnectionRegistry? registry, AcpRemoteServerLimits limits = const AcpRemoteServerLimits(), JsonRpcCodec codec = const JsonRpcCodec(), AcpSsePeriodicTimerFactory? sseTimerFactory, AcpHttpRequestPolicy? requestPolicy})
-
Creates an HTTP server around
createConnection.
Properties
- connectionCount → int
-
Number of initialized connections currently registered.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether close has begun.
no setter
- limits → AcpRemoteServerLimits
-
Limits adapters must enforce while streaming requests.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> - Stops accepting requests and closes active and pending connections.
-
handle(
AcpHttpRequest request) → Future< AcpHttpResponse> - Handles one already-bounded platform-neutral HTTP request.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited