public interface DispatchLayer<ConfigurationType> extends Configurable<ConfigurationType>
A dispatch layer can receive a reference to the Queue and a set of Activities, or a single Job and a set of Activities from the layer above it (or from the DispatchStackImpl object itself if this is the top layer). It can receive errors, results and partial or total completion events from the layer immediately below it.
To assist in graphical representation of the dispatch configuration each layer declares for each class of message whether it intercepts and alters, intercepts and observes or ignores (forwards) the message onto the next layer (either up or down depending on the message) and whether the layer is capable of instigating the creation of each class of message.
Modifier and Type | Method and Description |
---|---|
void |
finishedWith(String owningProcess)
Called when there will be no more events with the specified process
identifier, can be used to purge cached state from layers within the
stack
|
void |
receiveError(DispatchErrorEvent errorEvent)
Receive a single error reference from the layer below
|
void |
receiveJob(DispatchJobEvent jobEvent)
Receive a single job and associated set of activities from the layer
above
|
void |
receiveJobQueue(DispatchJobQueueEvent queueEvent)
Receive a pointer to the job queue along with a set of activities, this
is received from the layer above in the dispatch stack or from the
DispatchStackImpl object itself if this is the top layer.
|
void |
receiveResult(DispatchResultEvent resultEvent)
Receive a result from the layer below
|
void |
receiveResultCompletion(DispatchCompletionEvent completionEvent)
Receive a (possibly partial) completion event from the layer below.
|
void |
setDispatchStack(DispatchStack stack)
Set the parent dispatch stack of this layer, this is called when a layer
is added to the dispatch stack and can be safely ignored by end users of
this API
|
configure, getConfiguration
void receiveJobQueue(DispatchJobQueueEvent queueEvent)
void receiveJob(DispatchJobEvent jobEvent)
void receiveError(DispatchErrorEvent errorEvent)
void receiveResult(DispatchResultEvent resultEvent)
void receiveResultCompletion(DispatchCompletionEvent completionEvent)
void finishedWith(String owningProcess)
void setDispatchStack(DispatchStack stack)
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.