public abstract class BaseWorkerResponseContext extends Object implements WorkerResponseContext
WorkerResponseContext.| Modifier and Type | Field and Description |
|---|---|
protected WorkerSignal |
currentSignal |
protected List<CallableUnitCallback> |
responseCallbacks |
protected int[] |
retRegIndexes |
protected WorkerExecutionContext |
targetCtx |
protected int |
workerCount |
protected Map<String,WorkerDataChannel> |
workerDataChannels |
| Constructor and Description |
|---|
BaseWorkerResponseContext(int workerCount) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFailCallbackNotify(BStruct error) |
protected void |
doSuccessCallbackNotify() |
WorkerDataChannel |
getWorkerDataChannel(String name)
Creates and returns the data channels used to communicate between the workers.
|
WorkerExecutionContext |
joinTargetContextInfo(WorkerExecutionContext targetCtx,
int[] retRegIndexes)
Joins a new target worker execution context to the current response
context.
|
protected void |
modifyDebugCommands(WorkerExecutionContext parent,
WorkerExecutionContext child) |
protected WorkerExecutionContext |
onError(WorkerSignal signal) |
protected WorkerExecutionContext |
onHalt(WorkerSignal signal) |
protected void |
onMessage(WorkerSignal signal) |
protected WorkerExecutionContext |
onReturn(WorkerSignal signal) |
protected WorkerExecutionContext |
onTimeout(WorkerSignal signal) |
void |
registerResponseCallback(CallableUnitCallback responseCallback)
Registers a response callback handler with this context.
|
WorkerExecutionContext |
signal(WorkerSignal signal)
This is called by the workers to signal the response context of any
signal that needs to be passed into.
|
protected int[] retRegIndexes
protected WorkerSignal currentSignal
protected List<CallableUnitCallback> responseCallbacks
protected WorkerExecutionContext targetCtx
protected Map<String,WorkerDataChannel> workerDataChannels
protected int workerCount
public WorkerExecutionContext signal(WorkerSignal signal)
WorkerResponseContextsignal in interface WorkerResponseContextsignal - the signal to be passed inprotected WorkerExecutionContext onTimeout(WorkerSignal signal)
protected void onMessage(WorkerSignal signal)
protected WorkerExecutionContext onHalt(WorkerSignal signal)
protected WorkerExecutionContext onError(WorkerSignal signal)
protected WorkerExecutionContext onReturn(WorkerSignal signal)
protected void modifyDebugCommands(WorkerExecutionContext parent, WorkerExecutionContext child)
public WorkerExecutionContext joinTargetContextInfo(WorkerExecutionContext targetCtx, int[] retRegIndexes)
WorkerResponseContextjoinTargetContextInfo in interface WorkerResponseContexttargetCtx - the target worker execution contextretRegIndexes - the return registry locations of the target execution context
where the current worker execution context should report topublic WorkerDataChannel getWorkerDataChannel(String name)
WorkerResponseContextgetWorkerDataChannel in interface WorkerResponseContextname - the unique name of the data channel name requestedpublic void registerResponseCallback(CallableUnitCallback responseCallback)
responseCallback - the response callbackprotected void doSuccessCallbackNotify()
protected void doFailCallbackNotify(BStruct error)
Copyright © 2018 WSO2. All rights reserved.