Module java4ever.framework
Class SubscriptionHandle
java.lang.Object
tech.deplant.java4ever.framework.subscription.SubscriptionHandle
- All Implemented Interfaces:
Subscriptions
-
Nested Class Summary
Nested classes/interfaces inherited from interface tech.deplant.java4ever.framework.subscription.Subscriptions
Subscriptions.Builder, Subscriptions.SubscriptionType
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SubscriptionHandle
(int contextId, String queryText, boolean hasUnsubsribeCondition, Predicate<com.fasterxml.jackson.databind.JsonNode> unsubscribeCondition, Set<Predicate<com.fasterxml.jackson.databind.JsonNode>> consumeFilters, Set<Consumer<com.fasterxml.jackson.databind.JsonNode>> consumers, boolean isCallbackToQueue) -
Method Summary
Modifier and TypeMethodDescriptionvoid
broadcastToConsumers
(com.fasterxml.jackson.databind.JsonNode jsonNode) Deque
<com.fasterxml.jackson.databind.JsonNode> int
long
handle()
boolean
boolean
boolean
testConsumeFilters
(com.fasterxml.jackson.databind.JsonNode jsonNode) void
Unsubscribe.Predicate
<com.fasterxml.jackson.databind.JsonNode>
-
Field Details
-
handle
protected long handle
-
-
Constructor Details
-
SubscriptionHandle
protected SubscriptionHandle(int contextId, String queryText, boolean hasUnsubsribeCondition, Predicate<com.fasterxml.jackson.databind.JsonNode> unsubscribeCondition, Set<Predicate<com.fasterxml.jackson.databind.JsonNode>> consumeFilters, Set<Consumer<com.fasterxml.jackson.databind.JsonNode>> consumers, boolean isCallbackToQueue)
-
-
Method Details
-
hasUnsubsribeCondition
public boolean hasUnsubsribeCondition() -
unsubscribeCondition
-
consumers
-
queryText
-
contextId
public int contextId()- Specified by:
contextId
in interfaceSubscriptions
-
handle
public long handle()- Specified by:
handle
in interfaceSubscriptions
-
isCallbackToQueue
public boolean isCallbackToQueue()- Specified by:
isCallbackToQueue
in interfaceSubscriptions
-
callbackQueue
- Specified by:
callbackQueue
in interfaceSubscriptions
-
testConsumeFilters
public boolean testConsumeFilters(com.fasterxml.jackson.databind.JsonNode jsonNode) -
broadcastToConsumers
public void broadcastToConsumers(com.fasterxml.jackson.databind.JsonNode jsonNode) -
unsubscribe
public void unsubscribe()Unsubscribe.
-