public class DummyCallback extends Object implements AsynchronousActivityCallback
Modifier and Type | Field and Description |
---|---|
Map<String,T2Reference> |
data |
boolean |
failed |
List<RuntimeException> |
failures |
InvocationContext |
invocationContext |
ReferenceService |
referenceService |
Thread |
thread |
Constructor and Description |
---|
DummyCallback(ReferenceService referenceService) |
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 arg2)
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.
|
public ReferenceService referenceService
public InvocationContext invocationContext
public Map<String,T2Reference> data
public Thread thread
public boolean failed
public List<RuntimeException> failures
public DummyCallback(ReferenceService referenceService)
public void fail(String message, Throwable t)
AsynchronousActivityCallback
fail
in interface AsynchronousActivityCallback
public void fail(String message)
AsynchronousActivityCallback
fail
in interface AsynchronousActivityCallback
public void fail(String message, Throwable t, DispatchErrorType arg2)
AsynchronousActivityCallback
fail
in interface AsynchronousActivityCallback
public void receiveCompletion(int[] completionIndex)
AsynchronousActivityCallback
receiveCompletion
in interface AsynchronousActivityCallback
public void receiveResult(Map<String,T2Reference> data, int[] index)
AsynchronousActivityCallback
receiveResult
in interface AsynchronousActivityCallback
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[].public void requestRun(Runnable runMe)
AsynchronousActivityCallback
requestRun
in interface AsynchronousActivityCallback
runMe
- a Runnable to implement the activity proxy logic.public InvocationContext getContext()
AsynchronousActivityCallback
getContext
in interface AsynchronousActivityCallback
public String getParentProcessIdentifier()
AsynchronousActivityCallback
Any calls to Monitor.register... must establish a state tree rooted at this node, they may assume that this node already exists.
getParentProcessIdentifier
in interface AsynchronousActivityCallback
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.