public abstract class DevkitBasedMessageProcessor extends ExpressionEvaluatorSupport implements FlowConstructAware, MuleContextAware, Startable, Disposable, Stoppable, Initialisable
Modifier and Type | Field and Description |
---|---|
protected FlowConstruct |
flowConstruct
Flow Construct
|
protected Object |
moduleObject
Module object
|
protected MuleContext |
muleContext
Mule Context
|
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
DevkitBasedMessageProcessor(String operationName) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
protected abstract MuleEvent |
doProcess(MuleEvent event)
Implementors of this class need to implement this method in order to perform
actual processing
|
protected Object |
findOrCreate(Class<?> moduleClass,
boolean shouldAutoCreate,
MuleEvent muleEvent)
Obtains the expression manager from the Mule context and initialises the
connector.
|
String |
getAccessTokenId() |
FlowConstruct |
getFlowConstruct()
Retrieves flowConstruct
|
MuleContext |
getMuleContext()
Retrieves muleContext
|
void |
initialise()
Obtains the expression manager from the Mule context and initialises the
connector.
|
void |
overwritePayload(MuleEvent event,
Object resultPayload)
Overwrites the event payload with the specified one
|
MuleEvent |
process(MuleEvent event)
This final process implementation shields actual processing into abstract
method
doProcess(org.mule.api.MuleEvent) . |
void |
setAccessTokenId(String accessTokenId) |
void |
setFlowConstruct(FlowConstruct value)
Sets flowConstruct
|
void |
setModuleObject(Object value)
Sets moduleObject
|
void |
setMuleContext(MuleContext value)
Sets muleContext
|
void |
start() |
void |
stop() |
computeClassHierarchy, evaluate, evaluateAndTransform, evaluateAndTransform, getAccessTokenId, isAssignableFrom, isList, isListClass, isMap, isMapClass, transform, transform, transform
protected Object moduleObject
protected MuleContext muleContext
protected FlowConstruct flowConstruct
public DevkitBasedMessageProcessor(String operationName)
public MuleEvent process(MuleEvent event) throws MuleException
doProcess(org.mule.api.MuleEvent)
. Afterwards, it performs payload transformation by
invoking overwritePayload(org.mule.api.MuleEvent, Object)
In case the processing throws
NotAuthorizedException
, the
module object is casted to OAuthAdapter
and
exception handling is delegated into its
OnNoTokenPolicy
. For any other kind of
exception, it is logged and wrapped into a MuleException
event
- the current mule event.MuleException
protected abstract MuleEvent doProcess(MuleEvent event) throws Exception
event
- the mule eventException
protected final Object findOrCreate(Class<?> moduleClass, boolean shouldAutoCreate, MuleEvent muleEvent) throws IllegalAccessException, InstantiationException, ConfigurationException, RegistrationException
public final void overwritePayload(MuleEvent event, Object resultPayload) throws Exception
Exception
public void initialise() throws InitialisationException
initialise
in interface Initialisable
InitialisationException
RecoverableException
- 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 final void setMuleContext(MuleContext value)
setMuleContext
in interface MuleContextAware
value
- Value to setpublic final MuleContext getMuleContext()
public final void setFlowConstruct(FlowConstruct value)
setFlowConstruct
in interface FlowConstructAware
value
- Value to setpublic final FlowConstruct getFlowConstruct()
public final void setModuleObject(Object value)
value
- Value to setpublic String getAccessTokenId()
public void setAccessTokenId(String accessTokenId)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.