AcpV2ClientApp class final

Immutable client-side application for the draft ACP v2 baseline.

Available extensions

Constructors

AcpV2ClientApp({required Implementation implementation, required ClientCapabilities capabilities, String? name, AcpV2ApplicationOptions options = const AcpV2ApplicationOptions(), Iterable<AcpMethodDescriptorBase> protocolDescriptors = v2_methods.v2StableMethodDescriptors})
Creates a client with automatic version-2 initialization.

Properties

capabilities ClientCapabilities
Client capabilities.
final
hashCode int
The hash code for this object.
no setterinherited
implementation Implementation
Client implementation details.
final
name String
Diagnostic name.
final
options AcpV2ApplicationOptions
Runtime options.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

connect(AcpDuplexStream<Object?> stream, {AcpV2ConnectOptions connectOptions = const AcpV2ConnectOptions()}) AcpV2ClientConnection
Connects this client and begins initialization.
connectWith(AcpV2AgentApp agent, {int maximumBufferedMessages = 1024}) Future<AcpV2DirectConnectionPair>
Connects directly to agent.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCompleteElicitation(AcpV2ClientNotificationHandler<CompleteElicitationNotification> handler) AcpV2ClientApp

Available on AcpV2ClientApp, provided by the AcpV2ClientHandlers extension

Observes elicitation completion.
onConnect(AcpV2ClientConnectHandler handler) AcpV2ClientApp
Adds an exactly-once ready handler.
onCreateElicitation(AcpV2ClientRequestHandler<CreateElicitationRequest, CreateElicitationResponse> handler) AcpV2ClientApp

Available on AcpV2ClientApp, provided by the AcpV2ClientHandlers extension

Handles elicitation creation.
onNotification<P>(AcpMethodDescriptor<P, AcpNoResult> method, AcpV2ClientNotificationHandler<P> handler) AcpV2ClientApp
Registers a typed notification handler.
onRequest<P, R>(AcpMethodDescriptor<P, R> method, AcpV2ClientRequestHandler<P, R> handler) AcpV2ClientApp
Registers a typed request handler.
onRequestPermission(AcpV2ClientRequestHandler<RequestPermissionRequest, RequestPermissionResponse> handler) AcpV2ClientApp

Available on AcpV2ClientApp, provided by the AcpV2ClientHandlers extension

Handles a permission request.
onSessionUpdate(AcpV2ClientNotificationHandler<UpdateSessionNotification> handler) AcpV2ClientApp

Available on AcpV2ClientApp, provided by the AcpV2ClientHandlers extension

Observes a session update.
toString() String
A string representation of this object.
inherited
withOptions(AcpV2ApplicationOptions value) AcpV2ClientApp
Returns a copy with different options.
withProtocolDescriptors(Iterable<AcpMethodDescriptorBase> descriptors) AcpV2ClientApp
Adds wire-recognized descriptors.
withV2UnstableMethods() AcpV2ClientApp

Available on AcpV2ClientApp, provided by the AcpV2UnstableClientApp extension

Returns an immutable app with overlay descriptors and the runtime gate.

Operators

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