Interface Search<T>
-
- Type Parameters:
T- search result type
- All Superinterfaces:
AsynchronousCloseable,AutoCloseable
- All Known Implementing Classes:
MethodSearch,ServerSearch
public interface Search<T> extends AsynchronousCloseable
Entry point of the discovery API.- See Also:
ServerSearch,MethodSearch
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletionStage<Collection<T>>all()Retrieves all elements matching the search criteria.CompletionStage<T>any()Retrieves any one of the elements from a set matching the search criteria.static InstanceMatch.Builder<?>instance()static <R> MethodQuery<R>method(ReifiedType<R> returnType)static ServerQueryserver()static <E> MethodQuery<E>stream(ReifiedType<E> eventType)Return streaming method query for specified event type.-
Methods inherited from interface com.tick42.glue.core.AsynchronousCloseable
close, closeAsync, onClose
-
-
-
-
Method Detail
-
server
static ServerQuery server()
-
stream
static <E> MethodQuery<E> stream(ReifiedType<E> eventType)
Return streaming method query for specified event type.- Type Parameters:
E- type of the event- Parameters:
eventType- stream event type- Returns:
- streaming method query, never {code null}
- Since:
- 1.1
-
method
static <R> MethodQuery<R> method(ReifiedType<R> returnType)
-
instance
static InstanceMatch.Builder<?> instance()
-
all
CompletionStage<Collection<T>> all()
Retrieves all elements matching the search criteria.- Returns:
- a stage that will complete with the first batch of matching elements, never
null - Since:
- 1.3
-
any
CompletionStage<T> any()
Retrieves any one of the elements from a set matching the search criteria.- Returns:
- a stage that completes with any one of the matching elements, never
null - Since:
- 1.3
-
-