public interface AsynchronousActivityCallback
Modifier and Type | Method and Description |
---|---|
void |
fail(String message)
If the job fails (as opposed to succeeding and sending an error for which
the receiveResult method is used) this method will cause an error to be
sent up the dispatch stack, triggering any appropriate handling methods
such as retry, failover etc.
|
void |
fail(String message,
Throwable t)
If the job fails (as opposed to succeeding and sending an error for which
the receiveResult method is used) this method will cause an error to be
sent up the dispatch stack, triggering any appropriate handling methods
such as retry, failover etc.
|
void |
fail(String message,
Throwable t,
DispatchErrorType errorType)
If the job fails (as opposed to succeeding and sending an error for which
the receiveResult method is used) this method will cause an error to be
sent up the dispatch stack, triggering any appropriate handling methods
such as retry, failover etc.
|
InvocationContext |
getContext()
The invocation context contains resources such as data managers, security
agents and provenance consumers to be used by the Activity as it runs.
|
String |
getParentProcessIdentifier()
For activities which are going to establish state below the invoke node
in the monitor tree this method returns the owning process identifier
allocated to the invoke node.
|
void |
receiveCompletion(int[] completionIndex)
If (and only if) the activity is streaming data then this method can be
called to signal a (possibly partial) completion of the stream.
|
void |
receiveResult(Map<String,T2Reference> data,
int[] index)
Push a map of named identifiers out to the invocation layer which is then
responsible for wrapping them up into an appropriate Job object and
sending it up the dispatch stack.
|
void |
requestRun(Runnable runMe)
If an activity proxy wants to create a new thread of activity it should
use this method unless there is a very good reason not to.
|
InvocationContext getContext()
void requestRun(Runnable runMe)
runMe
- a Runnable to implement the activity proxy logic.void receiveResult(Map<String,T2Reference> data, int[] index)
data
- a single result data packetindex
- the index of the result in the context of this single process
invocation. If there's no streaming involved this should be a
zero length int[].void receiveCompletion(int[] completionIndex)
completionIndex
- void fail(String message, Throwable t, DispatchErrorType errorType)
message
- t
- void fail(String message, Throwable t)
message
- t
- void fail(String message)
message
- String getParentProcessIdentifier()
Any calls to Monitor.register... must establish a state tree rooted at this node, they may assume that this node already exists.
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.