Package-level declarations
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 io.spine.client.Client API
- is meant for client-side Java applications that would communicate with backend services via a gRPC connection. An instance of the io.spine.client.Client class establishes this connection and serves as a fluent API gateway for composing and posting requests.
- Low-level io.spine.client.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 io.spine.client.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 io.spine.client.StateConsumer and io.spine.client.EventConsumer). Errors occurred when streaming or consuming messages are handled via io.spine.client.ErrorHandler and io.spine.client.ConsumerErrorHandler correspondingly.
Types
Link copied to clipboard
A factory for various requests fired from the client-side by an actor.
Link copied to clipboard
The gRPC-based gateway for backend services such as
CommandService
, QueryService
, or SubscriptionService
.Link copied to clipboard
Entry point for creating client requests.
Link copied to clipboard
A factory of Command instances.
Link copied to clipboard
Allows to post a command optionally subscribing to events that are immediate results of handling this command.
Link copied to clipboard
A subscription filter which aggregates one or more EntityState filters.
Link copied to clipboard
A composite subscription filter which can aggregate both event message and event context filters.
Link copied to clipboard
A composite query filter which targets one or more entity columns.
Link copied to clipboard
Constant values shared between the client and the server code.
Link copied to clipboard
Functional interface for handlers of errors caused by consumers of messages.
Link copied to clipboard
A subscription filter which targets an EntityState.
Link copied to clipboard
Functional interface for error handlers.
Link copied to clipboard
Represents an operation which accepts an event message and its context.
Link copied to clipboard
A subscription filter which targets an Event.
Link copied to clipboard
Adapts gRPC streaming API to EventConsumer by passing the received Event to the accept method.
Link copied to clipboard
public final class EventSubscriptionRequest<E extends EventMessage> extends SubscribingRequest<M, C, W, B>
Allows to subscribe to events using filtering conditions.
Link copied to clipboard
public abstract class FilteringRequest<M extends Message, R extends Message, A extends TargetBuilder<R, A>, B extends FilteringRequest<M, R, A, B>> extends ClientRequest
Abstract base for client requests that may filter messages by certain criteria.
Link copied to clipboard
A boolean non-typed comparison operation on two given instances.
Link copied to clipboard
A builder for the Query instances.
Link copied to clipboard
A factory of Query instances.
Link copied to clipboard
A query filter which targets a column of an entity.
Link copied to clipboard
Useful methods for
Query
.Link copied to clipboard
Allows to create a post a query for messages of the given type.
Link copied to clipboard
A handler for an error occurred when posting a message for asynchronous processing at the server side.
Link copied to clipboard
Represents an operation that accepts a state of an entity.
Link copied to clipboard
public abstract class SubscribingRequest<M extends Message, C extends MessageContext, W extends Message, B extends SubscribingRequest<M, C, W, B>> extends FilteringRequest<M, R, A, B>
Abstract base for client requests that subscribe to messages.
Link copied to clipboard
Useful methods for Subscription.
Link copied to clipboard
public final class SubscriptionRequest<S extends EntityState> extends SubscribingRequest<M, C, W, B>
Allows to subscribe to updates of entity states using filtering conditions.
Link copied to clipboard
Maintains the list of the active subscriptions created by the Client.
Link copied to clipboard
An abstract base for builders that create Message instances which have a Target and a FieldMask as attributes.
Link copied to clipboard
A builder for the Topic instances.
Link copied to clipboard
A factory of Topic instances.