public abstract class RootProcessingExceptionHandler extends java.lang.Object implements ProcessingExceptionHandler, StateManagedComponent
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
RootProcessingExceptionHandler() |
Modifier and Type | Method and Description |
---|---|
void |
changeState(ComponentState newState)
Updates the state for the component
ComponentState . |
java.lang.Boolean |
getAlwaysHandleException() |
ProcessingExceptionHandler |
getParent() |
java.lang.String |
getUniqueId()
Get the unique-id that is associated with this component.
|
void |
notifyParent(AdaptrisMessage message) |
void |
onChildError(AdaptrisMessage message) |
void |
registerDigester(MessageErrorDigester digest) |
void |
registerParent(ProcessingExceptionHandler handler) |
void |
requestClose()
Request this component is closed.
|
void |
requestInit()
Request this component is init'd.
|
void |
requestStart()
Request this component is started.
|
void |
requestStop()
Request this component is stopped.
|
ComponentState |
retrieveComponentState()
Returns the last recorde
ComponentState . |
protected MessageErrorDigester |
retrieveDigester() |
void |
setAlwaysHandleException(java.lang.Boolean b)
Always handle any exceptions in this error handler.
|
void |
setUniqueId(java.lang.String uniqueId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleProcessingException, hasConfiguredBehaviour, registerWorkflow
close, init, start, stop
prepare
public void registerParent(ProcessingExceptionHandler handler)
registerParent
in interface ErrorHandlerRegistrar
public ProcessingExceptionHandler getParent()
public void notifyParent(AdaptrisMessage message)
notifyParent
in interface ErrorHandlerRegistrar
public void onChildError(AdaptrisMessage message)
onChildError
in interface ErrorHandlerRegistrar
public void requestInit() throws CoreException
StateManagedComponent
Request this component is init'd.
requestInit
in interface StateManagedComponent
CoreException
- wrapping any underlying Exceptionspublic void requestStart() throws CoreException
StateManagedComponent
Request this component is started.
requestStart
in interface StateManagedComponent
CoreException
- wrapping any underlying Exceptionspublic void requestStop()
StateManagedComponent
Request this component is stopped.
requestStop
in interface StateManagedComponent
public void requestClose()
StateManagedComponent
Request this component is closed.
requestClose
in interface StateManagedComponent
public ComponentState retrieveComponentState()
StateManagedComponent
Returns the last recorde ComponentState
.
retrieveComponentState
in interface StateManagedComponent
ComponentState
public void changeState(ComponentState newState)
StateManagedComponent
Updates the state for the component ComponentState
.
changeState
in interface StateManagedComponent
protected MessageErrorDigester retrieveDigester()
public void registerDigester(MessageErrorDigester digest)
registerDigester
in interface ErrorHandlerRegistrar
public java.lang.String getUniqueId()
AdaptrisComponent
getUniqueId
in interface AdaptrisComponent
public void setUniqueId(java.lang.String uniqueId)
public java.lang.Boolean getAlwaysHandleException()
public void setAlwaysHandleException(java.lang.Boolean b)
This is primarily useful if you have a chain of error handling (i.e you have configured an explicit error handling at one of the workflow / channel levels); by setting this to be true, then you fire the error handling on each of the configured error handlers in turn as they propogate back to the configured adapter error handler. This means that you can have a chain of error handling behaviour like (narrowest first).
This will cause the adapter-error-handler to write the original message to /opt/adaptris/bad
, as well as sending a 500
response back to the client.
Note that setting this to be true may have some behavioural oddities if you have chained RetryMessageErrorHandler
instances in configuration; The number of attempts that each configured RetryMessageErrorHandler
will attempt to handle
a message will vary; the total number of attempts should not exceed the highest configured max-retry-count on any individual
RetryMessageErrorHandler
b
- true or false, default null (false).