public final class OperationMessageProcessor extends Object implements MessageProcessor, MuleContextAware, Lifecycle
MessageProcessor
capable of executing extension operations.
It obtains a configuration instance, evaluate all the operation parameters
and executes a Operation
by using a operationExecutor
. This message processor is capable
of serving the execution of any Operation
of any Extension
.
A operationExecutor
is obtained by invoking Operation.getExecutor()
. That instance
will be use to serve all invokations of process(MuleEvent)
on this
instance but
will not be shared with other instances of OperationMessageProcessor
. All the Lifecycle
events that this
instace receives will be propagated to the operationExecutor
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
OperationMessageProcessor(org.mule.extension.introspection.Extension extension,
org.mule.extension.introspection.Operation operation,
String configurationInstanceProviderName,
ResolverSet resolverSet,
ExtensionManagerAdapter extensionManager) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
void |
initialise()
Method used to perform any initialisation work.
|
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
setMuleContext(MuleContext muleContext) |
void |
start() |
void |
stop() |
public OperationMessageProcessor(org.mule.extension.introspection.Extension extension, org.mule.extension.introspection.Operation operation, String configurationInstanceProviderName, ResolverSet resolverSet, ExtensionManagerAdapter extensionManager)
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processedMuleException
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 setMuleContext(MuleContext muleContext)
setMuleContext
in interface MuleContextAware
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.