@DispatchLayerErrorReaction(emits=RESULT, relaysUnmodified=false, stateEffects={CREATE_PROCESS_STATE,UPDATE_PROCESS_STATE}) @DispatchLayerJobReaction(emits=RESULT, relaysUnmodified=true, stateEffects={CREATE_PROCESS_STATE,UPDATE_PROCESS_STATE,NO_EFFECT}) @DispatchLayerResultReaction(emits={}, relaysUnmodified=true, stateEffects={}) @DispatchLayerResultCompletionReaction(emits={}, relaysUnmodified=true, stateEffects={}) @SupportsStreamedResult public class ErrorBounce extends AbstractDispatchLayer<com.fasterxml.jackson.databind.JsonNode> implements PropertyContributingDispatchLayer<com.fasterxml.jackson.databind.JsonNode>
Modifier and Type | Class and Description |
---|---|
class |
ErrorBounce.ErrorBounceState |
Modifier and Type | Field and Description |
---|---|
static String |
URI |
CLEANUP_DELAY_MS, cleanupTimer, dispatchStack
Constructor and Description |
---|
ErrorBounce() |
Modifier and Type | Method and Description |
---|---|
void |
configure(com.fasterxml.jackson.databind.JsonNode config)
When the item is built from the workflow definition XML the object is
first constructed with a default constructor then this method is called,
passing in the configuration bean returned by getConfiguration().
|
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
|
com.fasterxml.jackson.databind.JsonNode |
getConfiguration()
Each item stores configuration within a bean of type ConfigurationType,
this method returns the configuration.
|
void |
injectPropertiesFor(String owningProcess)
Two properties, dispatch.errorbounce.reflected(integer) is the number of
incoming jobs which have been bounced back as results with errors,
dispatch.errorbounce.translated(integer) is the number of failures from
downstream in the stack that have been re-written as complete results
containing error documents.
|
void |
receiveError(DispatchErrorEvent errorEvent)
Always send the error document job result on receiving a failure, at
least for now! This should be configurable, in effect this is the part
that ensures the processor never sees a top level failure.
|
void |
receiveJob(DispatchJobEvent jobEvent)
If the job contains errors, or collections which contain errors
themselves then bounce a result message with error documents in back up
to the layer above
|
getAbove, getBelow, getProcessor, receiveJobQueue, receiveResult, receiveResultCompletion, setDispatchStack
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
receiveJobQueue, receiveResult, receiveResultCompletion, setDispatchStack
public static final String URI
public void receiveJob(DispatchJobEvent jobEvent)
receiveJob
in interface DispatchLayer<com.fasterxml.jackson.databind.JsonNode>
receiveJob
in class AbstractDispatchLayer<com.fasterxml.jackson.databind.JsonNode>
public void receiveError(DispatchErrorEvent errorEvent)
receiveError
in interface DispatchLayer<com.fasterxml.jackson.databind.JsonNode>
receiveError
in class AbstractDispatchLayer<com.fasterxml.jackson.databind.JsonNode>
public void configure(com.fasterxml.jackson.databind.JsonNode config)
Configurable
configure
in interface Configurable<com.fasterxml.jackson.databind.JsonNode>
public com.fasterxml.jackson.databind.JsonNode getConfiguration()
Configurable
getConfiguration
in interface Configurable<com.fasterxml.jackson.databind.JsonNode>
public void finishedWith(String owningProcess)
DispatchLayer
finishedWith
in interface DispatchLayer<com.fasterxml.jackson.databind.JsonNode>
finishedWith
in class AbstractDispatchLayer<com.fasterxml.jackson.databind.JsonNode>
public void injectPropertiesFor(String owningProcess)
injectPropertiesFor
in interface PropertyContributingDispatchLayer<com.fasterxml.jackson.databind.JsonNode>
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.