public abstract class AbstractMessageProcessorChain extends Object implements MessageProcessorChain, Lifecycle, FlowConstructAware, MuleContextAware, EndpointAware, MessageProcessorContainer, MessagingExceptionHandlerAware
Modifier and Type | Field and Description |
---|---|
protected Log |
log |
protected String |
name |
protected List<MessageProcessor> |
processors |
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
AbstractMessageProcessorChain(String name,
List<MessageProcessor> processors) |
Modifier and Type | Method and Description |
---|---|
void |
addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
Add the child nodes to the path element tree.
|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
protected abstract MuleEvent |
doProcess(MuleEvent event) |
List<MessageProcessor> |
getMessageProcessors() |
String |
getName()
Gets the name of the object
|
void |
initialise()
Method used to perform any initialisation work.
|
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
setEndpoint(ImmutableEndpoint endpoint) |
void |
setFlowConstruct(FlowConstruct flowConstruct) |
void |
setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler) |
void |
setMuleContext(MuleContext context) |
void |
start() |
void |
stop() |
String |
toString() |
protected final transient Log log
protected String name
protected List<MessageProcessor> processors
public AbstractMessageProcessorChain(String name, List<MessageProcessor> processors)
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processedMuleException
protected abstract MuleEvent doProcess(MuleEvent event) throws MuleException
MuleException
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic void start() throws MuleException
start
in interface Startable
MuleException
public void stop() throws MuleException
stop
in interface Stoppable
MuleException
public void dispose()
Disposable
dispose
in interface Disposable
public void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct
in interface FlowConstructAware
public String getName()
NamedObject
getName
in interface NamedObject
public void setEndpoint(ImmutableEndpoint endpoint)
setEndpoint
in interface EndpointAware
public List<MessageProcessor> getMessageProcessors()
getMessageProcessors
in interface MessageProcessorChain
public void addMessageProcessorPathElements(MessageProcessorPathElement pathElement)
MessageProcessorContainer
addMessageProcessorPathElements
in interface MessageProcessorContainer
public void setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler)
setMessagingExceptionHandler
in interface MessagingExceptionHandlerAware
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.