public class AsyncInvocableWorkerResponseContext extends SyncCallableWorkerResponseContext
WorkerResponseContext
implementation which supports calling
the asynchronous functions.fulfilled, haltCount, responseTypes, workerErrors
currentSignal, responseCallbacks, retRegIndexes, targetCtx, workerCount, workerDataChannels
Constructor and Description |
---|
AsyncInvocableWorkerResponseContext(CallableUnitInfo callableUnitInfo) |
AsyncInvocableWorkerResponseContext(CallableUnitInfo callableUnitInfo,
int workerCount) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel() |
boolean |
isCancelled() |
boolean |
isDone() |
WorkerExecutionContext |
joinTargetContextInfo(WorkerExecutionContext targetCtx,
int[] retRegIndexes)
Joins a new target worker execution context to the current response
context.
|
WorkerExecutionContext |
onFulfillment(boolean runInCaller) |
protected WorkerExecutionContext |
propagateErrorToTarget() |
void |
setWorkerExecutionContexts(List<WorkerExecutionContext> workerExecutionContexts) |
WorkerExecutionContext |
signal(WorkerSignal signal)
This is called by the workers to signal the response context of any
signal that needs to be passed into.
|
onError, onHalt, onMessage, onReturn
getCurrentSignal, getWorkerErrors, handleAlreadyFulfilled, initWorkerErrors, isFulfilled, isReturnable, isWorkersDone, onFinalizedError, printError, printStoredErrors, setAsFulfilled, setCurrentSignal, storeError
doFailCallbackNotify, doSuccessCallbackNotify, getWorkerDataChannel, modifyDebugCommands, onTimeout, registerResponseCallback
public AsyncInvocableWorkerResponseContext(CallableUnitInfo callableUnitInfo, int workerCount)
public AsyncInvocableWorkerResponseContext(CallableUnitInfo callableUnitInfo)
public void setWorkerExecutionContexts(List<WorkerExecutionContext> workerExecutionContexts)
public WorkerExecutionContext signal(WorkerSignal signal)
WorkerResponseContext
signal
in interface WorkerResponseContext
signal
in class BaseWorkerResponseContext
signal
- the signal to be passed inpublic WorkerExecutionContext joinTargetContextInfo(WorkerExecutionContext targetCtx, int[] retRegIndexes)
WorkerResponseContext
joinTargetContextInfo
in interface WorkerResponseContext
joinTargetContextInfo
in class BaseWorkerResponseContext
targetCtx
- the target worker execution contextretRegIndexes
- the return registry locations of the target execution context
where the current worker execution context should report topublic WorkerExecutionContext onFulfillment(boolean runInCaller)
onFulfillment
in class CallableWorkerResponseContext
protected WorkerExecutionContext propagateErrorToTarget()
propagateErrorToTarget
in class CallableWorkerResponseContext
public boolean isDone()
public boolean isCancelled()
public boolean cancel()
Copyright © 2018 WSO2. All rights reserved.