java.lang.Object
tech.deplant.java4ever.framework.SubscribeHandle
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSubscribeHandle(int contextId, String queryText) Instantiates a new Subscribe handle. -
Method Summary
Modifier and TypeMethodDescriptionaddConsumeFilter(Predicate<com.fasterxml.jackson.databind.JsonNode> consumeFilter) Add consume filter subscribe handle.addEventConsumer(Consumer<com.fasterxml.jackson.databind.JsonNode> eventConsumer) Add event consumer subscribe handle.addUnsubscribeFilter(Predicate<com.fasterxml.jackson.databind.JsonNode> unsubscribeFilter) Add unsubscribe filter subscribe handle.voidclose()intContext id int.longhandle()Handle long.Query text string.static com.fasterxml.jackson.databind.JsonNodesingleJsonGetSyncAwait(int contextId, String queryText) Single json get sync await json node.Subscribe subscribe handle.voidUnsubscribe.
-
Field Details
-
TR_SUCCESSFUL
The constant TR_SUCCESSFUL. -
TRANSACTIONS_SUB
-
-
Constructor Details
-
SubscribeHandle
Instantiates a new Subscribe handle.- Parameters:
contextId- the context idqueryText- the query text
-
-
Method Details
-
singleJsonGetSyncAwait
public static com.fasterxml.jackson.databind.JsonNode singleJsonGetSyncAwait(int contextId, String queryText) throws ExecutionException, InterruptedException, TimeoutException, tech.deplant.java4ever.binding.EverSdkException Single json get sync await json node.- Parameters:
contextId- the context idqueryText- the query text- Returns:
- the json node
- Throws:
ExecutionException- the execution exceptionInterruptedException- the interrupted exceptionTimeoutException- the timeout exceptiontech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
addEventConsumer
public SubscribeHandle addEventConsumer(Consumer<com.fasterxml.jackson.databind.JsonNode> eventConsumer) Add event consumer subscribe handle.- Parameters:
eventConsumer- the event consumer- Returns:
- the subscribe handle
-
addConsumeFilter
public SubscribeHandle addConsumeFilter(Predicate<com.fasterxml.jackson.databind.JsonNode> consumeFilter) Add consume filter subscribe handle.- Parameters:
consumeFilter- the consume filter- Returns:
- the subscribe handle
-
addUnsubscribeFilter
public SubscribeHandle addUnsubscribeFilter(Predicate<com.fasterxml.jackson.databind.JsonNode> unsubscribeFilter) Add unsubscribe filter subscribe handle.- Parameters:
unsubscribeFilter- the unsubscribe filter- Returns:
- the subscribe handle
-
subscribe
Subscribe subscribe handle.- Returns:
- the subscribe handle
- Throws:
tech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
unsubscribe
public void unsubscribe()Unsubscribe. -
contextId
public int contextId()Context id int.- Returns:
- the int
-
queryText
-
handle
public long handle()Handle long.- Returns:
- the long
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-