public abstract class AbstractExceptionListener extends AbstractMessageProcessorOwner implements GlobalNameableObject
AbstractMessagingExceptionStrategy (if you are creating a Messaging Exception Strategy)
or AbstractSystemExceptionStrategy (if you are creating a System Exception Strategy) rather than directly from this class.| Modifier and Type | Field and Description |
|---|---|
protected WildcardFilter |
commitTxFilter |
protected boolean |
enableNotifications |
protected String |
globalName |
protected AtomicBoolean |
initialised |
protected org.apache.commons.logging.Log |
logger |
protected List<MessageProcessor> |
messageProcessors |
protected static String |
NOT_SET |
protected WildcardFilter |
rollbackTxFilter |
flowConstruct, messagingExceptionHandler, muleContextPHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAMEPROPERTY_NAME| Constructor and Description |
|---|
AbstractExceptionListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEndpoint(MessageProcessor processor) |
protected void |
closeStream(MuleMessage message) |
protected void |
commit() |
protected void |
doInitialise(MuleContext context) |
protected void |
fireNotification(Exception ex) |
protected void |
fireNotification(ServerNotification notification)
Fires a server notification to all registered
ExceptionNotificationListener
eventManager. |
WildcardFilter |
getCommitTxFilter() |
protected Throwable |
getExceptionType(Throwable t,
Class<? extends Throwable> exceptionType) |
String |
getGlobalName() |
List<MessageProcessor> |
getMessageProcessors() |
protected List<MessageProcessor> |
getOwnedMessageProcessors() |
WildcardFilter |
getRollbackTxFilter() |
protected void |
handleTransaction(Throwable t)
Deprecated.
this method should not be used anymore. Transactions must be handled by provided ExceptionStrategy
|
void |
initialise()
The initialise method is call every time the Exception stategy is assigned to
a service or connector.
|
boolean |
isEnableNotifications() |
boolean |
isInitialised() |
protected boolean |
isRollback(Throwable t) |
protected void |
logException(Throwable t)
Used to log the error passed into this Exception Listener
|
protected void |
logFatal(MuleEvent event,
Throwable t)
Logs a fatal error message to the logging system.
|
boolean |
removeMessageProcessor(MessageProcessor processor) |
protected void |
rollback(Exception ex) |
protected void |
rollback(RollbackSourceCallback rollbackMethod)
Deprecated.
use
rollback(Exception) instead |
protected void |
rollbackTransaction()
Deprecated.
use
rollback(Exception) instead.
parameter should be null |
protected void |
routeException(MuleEvent event,
MessageProcessor target,
Throwable t)
Deprecated.
|
protected void |
routeException(MuleEvent event,
Throwable t)
Routes the current exception to an error endpoint such as a Dead Letter Queue
(jms) This method is only invoked if there is a MuleMessage available to
dispatch.
|
void |
setCommitTxFilter(WildcardFilter commitTxFilter) |
void |
setEnableNotifications(boolean enableNotifications) |
void |
setGlobalName(String globalName) |
void |
setMessageProcessors(List<MessageProcessor> processors) |
void |
setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler) |
void |
setRollbackTxFilter(WildcardFilter rollbackTxFilter) |
addMessageProcessorPathElements, getAnnotation, getAnnotations, getOwnedObjects, setAnnotationsdispose, getFlowConstruct, getMessagingExceptionHandler, getMuleContext, setFlowConstruct, setMuleContext, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisposesetMuleContextsetFlowConstructprotected static final String NOT_SET
protected transient org.apache.commons.logging.Log logger
protected List<MessageProcessor> messageProcessors
protected AtomicBoolean initialised
protected WildcardFilter rollbackTxFilter
protected WildcardFilter commitTxFilter
protected boolean enableNotifications
protected String globalName
public String getGlobalName()
getGlobalName in interface GlobalNameableObjectpublic void setGlobalName(String globalName)
setGlobalName in interface GlobalNameableObjectprotected boolean isRollback(Throwable t)
public List<MessageProcessor> getMessageProcessors()
public void setMessageProcessors(List<MessageProcessor> processors)
public void addEndpoint(MessageProcessor processor)
public boolean removeMessageProcessor(MessageProcessor processor)
protected Throwable getExceptionType(Throwable t, Class<? extends Throwable> exceptionType)
public final void initialise()
throws InitialisationException
doInitialise() method.initialise in interface Initialisableinitialise in class AbstractMuleObjectOwner<MessageProcessor>InitialisationExceptionRecoverableException - if an error occurs that can be recovered fromprotected void doInitialise(MuleContext context) throws InitialisationException
InitialisationExceptionprotected void fireNotification(Exception ex)
protected void routeException(MuleEvent event, Throwable t)
ExceptionMessage which contains the exception thrown the
MuleMessage and any context information.event - the MuleEvent being processed when the exception occurredt - the exception thrown. This will be sent with the ExceptionMessageExceptionMessage@Deprecated protected void routeException(MuleEvent event, MessageProcessor target, Throwable t)
routeException(org.mule.api.MuleEvent, Throwable) instead@Deprecated protected void rollback(RollbackSourceCallback rollbackMethod)
rollback(Exception) insteadprotected void closeStream(MuleMessage message)
protected void logException(Throwable t)
t - the exception thrownprotected void logFatal(MuleEvent event, Throwable t)
event - The MuleEvent currently being processedt - the fatal exception to logpublic boolean isInitialised()
protected void fireNotification(ServerNotification notification)
ExceptionNotificationListener
eventManager.notification - the notification to fire.public WildcardFilter getCommitTxFilter()
public void setCommitTxFilter(WildcardFilter commitTxFilter)
public boolean isEnableNotifications()
public void setEnableNotifications(boolean enableNotifications)
public WildcardFilter getRollbackTxFilter()
public void setRollbackTxFilter(WildcardFilter rollbackTxFilter)
protected List<MessageProcessor> getOwnedMessageProcessors()
getOwnedMessageProcessors in class AbstractMessageProcessorOwnerpublic void setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler)
setMessagingExceptionHandler in interface MessagingExceptionHandlerAwaresetMessagingExceptionHandler in class AbstractMuleObjectOwner<MessageProcessor>@Deprecated protected void rollbackTransaction()
rollback(Exception) instead.
parameter should be null@Deprecated protected void handleTransaction(Throwable t)
protected void commit()
protected void rollback(Exception ex)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.