public abstract class TemplateOnErrorHandler extends AbstractExceptionListener implements MessagingExceptionHandlerAcceptor
commitTxFilter, enableNotifications, globalName, initialised, logException, logger, messageProcessors, NOT_SET, rollbackTxFilterflowConstruct, messagingExceptionHandler, muleContext| Constructor and Description |
|---|
TemplateOnErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Event event) |
boolean |
acceptsAll() |
protected Event |
afterRouting(MessagingException exception,
Event event) |
org.reactivestreams.Publisher<Event> |
apply(MessagingException exception) |
protected Event |
beforeRouting(MessagingException exception,
Event event) |
protected void |
doInitialise(MuleContext muleContext) |
protected List<Processor> |
getOwnedMessageProcessors() |
Event |
handleException(MessagingException exception,
Event event)
Take some action when a messaging exception has occurred (i.e., there was a message in play when the exception occurred).
|
protected void |
markExceptionAsHandled(Exception exception) |
protected Event |
nullifyExceptionPayloadIfRequired(Event event) |
protected Event |
processReplyTo(Event event,
Exception e) |
protected org.reactivestreams.Publisher<Event> |
routeAsync(Event event,
MessagingException t) |
void |
setErrorType(String errorType) |
void |
setHandleException(boolean handleException) |
void |
setMessageProcessors(List<Processor> processors) |
void |
setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler) |
void |
setWhen(String when) |
addEndpoint, buildRouter, closeStream, commit, doLogException, fireNotification, fireNotification, getCommitTxFilter, getExceptionType, getGlobalName, getMessageProcessors, getRollbackTxFilter, initialise, isEnableNotifications, isInitialised, isLogException, isRollback, logException, logFatal, removeMessageProcessor, rollback, routeException, setCommitTxFilter, setEnableNotifications, setGlobalName, setLogException, setRollbackTxFiltergetOwnedObjectsdispose, getFlowConstruct, getMuleContext, setFlowConstruct, setMuleContext, start, stopgetAnnotation, getAnnotations, getLocation, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetMuleContextsetFlowConstructpublic final Event handleException(MessagingException exception, Event event)
MessagingExceptionHandlerhandleException in interface MessagingExceptionHandlerexception - which occurredevent - which was being processed when the exception occurredpublic org.reactivestreams.Publisher<Event> apply(MessagingException exception)
apply in interface Function<MessagingException,org.reactivestreams.Publisher<Event>>apply in interface MessagingExceptionHandlerpublic void setMessageProcessors(List<Processor> processors)
setMessageProcessors in class AbstractExceptionListenerprotected List<Processor> getOwnedMessageProcessors()
getOwnedMessageProcessors in class AbstractExceptionListenerprotected void markExceptionAsHandled(Exception exception)
protected org.reactivestreams.Publisher<Event> routeAsync(Event event, MessagingException t)
protected void doInitialise(MuleContext muleContext) throws org.mule.runtime.api.lifecycle.InitialisationException
doInitialise in class AbstractExceptionListenerorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void setWhen(String when)
public boolean accept(Event event)
accept in interface Acceptorevent - Event to route through exception handlerMessagingExceptionHandler should handler exception false
otherwisepublic boolean acceptsAll()
acceptsAll in interface Acceptorprotected Event afterRouting(MessagingException exception, Event event)
protected Event beforeRouting(MessagingException exception, Event event)
public void setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler)
setMessagingExceptionHandler in interface MessagingExceptionHandlerAwaresetMessagingExceptionHandler in class AbstractExceptionListenerpublic void setHandleException(boolean handleException)
public void setErrorType(String errorType)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.