FilteringRequest

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.

This class warps around TargetBuilder for providing fluent API for client request composition and placement.

Parameters

<M>

the type of the messages returned by the request

<R>

the type of the request to be posted

<A>

the type of the builder of the request

<B>

the type of this client request (which wraps over type <A> for return type covariance

Inheritors

Functions

Link copied to clipboard
public B byId(Array<Message> ids)
public B byId(Array<Integer> ids)
public B byId(Iterable<? extends Object> ids)
public B byId(Array<Long> ids)
public B byId(Array<String> ids)
Requests only passed IDs to be included into the result of the request.
Link copied to clipboard
public B where(Array<CompositeFilter> filter)
public B where(Array<Filter> filter)
Configures the request to return results matching all the passed filters.
Link copied to clipboard
public B withMask(Iterable<String> fieldNames)
public B withMask(Array<String> fieldNames)
Instructs to populate only fields with the passed names in the results of the request.

Inherited 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.