org.mule.cache
Class CachingMessageProcessor
java.lang.Object
org.mule.processor.AbstractMessageProcessorOwner
org.mule.cache.CachingMessageProcessor
- All Implemented Interfaces:
- AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, InterceptingMessageProcessor, MessageProcessor, MessageSource
public class CachingMessageProcessor
- extends AbstractMessageProcessorOwner
- implements Initialisable, InterceptingMessageProcessor
Processes a MuleEvent
using a CachingStrategy
.
Provides a configurable filter to check whether or not a given request has
to go through the cache or not. All requests are processed using the caching
strategy by default.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected Log logger
CachingMessageProcessor
public CachingMessageProcessor()
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
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.
- Specified by:
initialise
in interface Initialisable
- Overrides:
initialise
in class AbstractMessageProcessorOwner
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
createDefaultCacheFilter
protected AcceptAllFilter createDefaultCacheFilter()
createDefaultCachingStrategy
protected CachingStrategy createDefaultCachingStrategy()
process
public MuleEvent process(MuleEvent event)
throws MuleException
- Description copied from interface:
MessageProcessor
- Invokes the MessageProcessor.
- Specified by:
process
in interface MessageProcessor
- Parameters:
event
- MuleEvent to be processed
- Returns:
- optional response MuleEvent
- Throws:
MuleException
processNext
protected MuleEvent processNext(MuleEvent event)
throws MuleException
- Throws:
MuleException
setMessageProcessors
public void setMessageProcessors(List<MessageProcessor> messageProcessors)
throws MuleException
- Throws:
MuleException
getOwnedMessageProcessors
protected List<MessageProcessor> getOwnedMessageProcessors()
- Specified by:
getOwnedMessageProcessors
in class AbstractMessageProcessorOwner
setListener
public void setListener(MessageProcessor listener)
- Description copied from interface:
MessageSource
- Set the MessageProcessor listener on a message source which will be invoked
when a message is received or generated.
- Specified by:
setListener
in interface MessageSource
getCachingStrategy
public CachingStrategy getCachingStrategy()
setCachingStrategy
public void setCachingStrategy(CachingStrategy cachingStrategy)
getFilter
public Filter getFilter()
setFilter
public void setFilter(Filter filter)
Copyright © 2003-2011 MuleSoft, Inc.. All Rights Reserved.