public class SimpleQueryUpdateEmitter extends Object implements QueryUpdateEmitter
QueryUpdateEmitter that uses Project Reactor to implement Update Handlers.| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleQueryUpdateEmitter.Builder
Builder class to instantiate a
SimpleQueryUpdateEmitter. |
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleQueryUpdateEmitter(SimpleQueryUpdateEmitter.Builder builder)
Instantiate a
SimpleQueryUpdateEmitter based on the fields contained in the SimpleQueryUpdateEmitter.Builder. |
| Modifier and Type | Method and Description |
|---|---|
Set<SubscriptionQueryMessage<?,?,?>> |
activeSubscriptions()
Provides the set of running subscription queries.
|
static SimpleQueryUpdateEmitter.Builder |
builder()
Instantiate a Builder to be able to create a
SimpleQueryUpdateEmitter. |
void |
complete(Predicate<SubscriptionQueryMessage<?,?,?>> filter)
Completes subscription queries matching given filter.
|
void |
completeExceptionally(Predicate<SubscriptionQueryMessage<?,?,?>> filter,
Throwable cause)
Completes with an error subscription queries matching given filter.
|
<U> void |
emit(Predicate<SubscriptionQueryMessage<?,?,U>> filter,
SubscriptionQueryUpdateMessage<U> update)
Emits incremental update (as return value of provided update function) to subscription queries matching given
filter.
|
boolean |
queryUpdateHandlerRegistered(SubscriptionQueryMessage<?,?,?> query)
Checks whether there is a query update handler for a given
query. |
Registration |
registerDispatchInterceptor(MessageDispatchInterceptor<? super SubscriptionQueryUpdateMessage<?>> interceptor)
Register the given DispatchInterceptor.
|
<U> UpdateHandlerRegistration<U> |
registerUpdateHandler(SubscriptionQueryMessage<?,?,?> query,
int updateBufferSize)
Registers an Update Handler for given
query with given updateBufferSize. |
<U> UpdateHandlerRegistration<U> |
registerUpdateHandler(SubscriptionQueryMessage<?,?,?> query,
SubscriptionQueryBackpressure backpressure,
int updateBufferSize)
Deprecated.
in favour of using {
registerUpdateHandler(SubscriptionQueryMessage, int)} |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomplete, completeExceptionally, emit, emit, emitprotected SimpleQueryUpdateEmitter(SimpleQueryUpdateEmitter.Builder builder)
SimpleQueryUpdateEmitter based on the fields contained in the SimpleQueryUpdateEmitter.Builder.builder - the SimpleQueryUpdateEmitter.Builder used to instantiate a SimpleQueryUpdateEmitter instancepublic static SimpleQueryUpdateEmitter.Builder builder()
SimpleQueryUpdateEmitter.
The MessageMonitor is defaulted to a NoOpMessageMonitor and the SpanFactory is defauled
to a NoOpSpanFactory.
SimpleQueryUpdateEmitterpublic boolean queryUpdateHandlerRegistered(@Nonnull SubscriptionQueryMessage<?,?,?> query)
QueryUpdateEmitterquery.queryUpdateHandlerRegistered in interface QueryUpdateEmitterquery - the subscription query for which we have registered the update handlertrue if there is an update handler registered for given query, false otherwise@Deprecated public <U> UpdateHandlerRegistration<U> registerUpdateHandler(SubscriptionQueryMessage<?,?,?> query, SubscriptionQueryBackpressure backpressure, int updateBufferSize)
registerUpdateHandler(SubscriptionQueryMessage, int)}query with given backpressure and updateBufferSize.registerUpdateHandler in interface QueryUpdateEmitterU - the incremental response types of the queryquery - the subscription query for which we register an Update Handlerbackpressure - the backpressure mechanism to be used for emitting updatesupdateBufferSize - the size of buffer which accumulates updates before subscription to the flux is
madepublic <U> UpdateHandlerRegistration<U> registerUpdateHandler(@Nonnull SubscriptionQueryMessage<?,?,?> query, int updateBufferSize)
QueryUpdateEmitterquery with given updateBufferSize.registerUpdateHandler in interface QueryUpdateEmitterU - the incremental response types of the queryquery - the subscription query for which we register an Update HandlerupdateBufferSize - the size of buffer which accumulates updates before subscription to the flux is
madepublic <U> void emit(@Nonnull Predicate<SubscriptionQueryMessage<?,?,U>> filter, @Nonnull SubscriptionQueryUpdateMessage<U> update)
QueryUpdateEmitteremit in interface QueryUpdateEmitterU - the type of the updatefilter - predicate on subscription query message used to filter subscription queriesupdate - incremental update messagepublic void complete(@Nonnull Predicate<SubscriptionQueryMessage<?,?,?>> filter)
QueryUpdateEmittercomplete in interface QueryUpdateEmitterfilter - predicate on subscription query message used to filter subscription queriespublic void completeExceptionally(@Nonnull Predicate<SubscriptionQueryMessage<?,?,?>> filter, @Nonnull Throwable cause)
QueryUpdateEmittercompleteExceptionally in interface QueryUpdateEmitterfilter - predicate on subscription query message used to filter subscription queriescause - the cause of an error@Nonnull public Registration registerDispatchInterceptor(@Nonnull MessageDispatchInterceptor<? super SubscriptionQueryUpdateMessage<?>> interceptor)
MessageDispatchInterceptorSupportregisterDispatchInterceptor in interface MessageDispatchInterceptorSupport<SubscriptionQueryUpdateMessage<?>>interceptor - The interceptor to registerpublic Set<SubscriptionQueryMessage<?,?,?>> activeSubscriptions()
QueryUpdateEmitteractiveSubscriptions in interface QueryUpdateEmitterCopyright © 2010–2023. All rights reserved.