ClientRequest

public class ClientRequest

Entry point for creating client requests.

An instance of this class is obtained via onBehalfOf or asGuest methods and then used for creating a specific client request e.g. for posting a command or running a query.

A client request is customizing using fluent API, which is provided by the derived classes.

See also

Inheritors

Functions

Link copied to clipboard
protected final Client client()
Obtains the client instance that will perform the request.
Link copied to clipboard
public CommandRequest command(CommandMessage c)
Creates a builder for customizing command request.
Link copied to clipboard
Assigns a handler for an error occurred on the server-side (such as validation error) in response to posting a request.
Link copied to clipboard
Assigns a handler for errors occurred when delivering messages from the server.
Link copied to clipboard
public QueryRequest<S> select<S extends EntityState>(Class<S> type)
Creates a builder for constructing a query for messages of the specified type.
Link copied to clipboard
public SubscriptionRequest<S> subscribeTo<S extends EntityState>(Class<S> type)
Creates a builder for customizing subscription for the passed entity state type.
Link copied to clipboard
public EventSubscriptionRequest<E> subscribeToEvent<E extends EventMessage>(Class<E> type)
Creates a builder for customizing subscription for the passed event type.
Link copied to clipboard
protected final UserId user()
Obtains the ID of the user of the request.