Skip navigation links

@CheckReturnValue @ParametersAreNonnullByDefault

Package io.spine.client

This package provides classes and interfaces for performing client requests like posting commands, running queries, or creating subscriptions.

See: Description

Package io.spine.client Description

This package provides classes and interfaces for performing client requests like posting commands, running queries, or creating subscriptions.

The term actor used in this API means the user on behalf of whom requests are created and executed. The package provides two levels of API.

High-level Client API
is meant for client-side Java applications that would communicate with backend services via a gRPC connection. An instance of the Client class establishes this connection and serves as a fluent API gateway for composing and posting requests.
Low-level ActorRequestFactory API
is meant for server-side code which needs to speak to backend services without involving gRPC. This API is also by the High-level API implementation.

The Filters utility class provides methods for composing filtering conditions for both levels of the API.

When subscribing the Client API accepts an implementation of a functional interface (see StateConsumer and EventConsumer). Errors occurred when streaming or consuming messages are handled via ErrorHandler and ConsumerErrorHandler correspondingly.

Skip navigation links