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_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
DevkitBasedMessageProcessor(String operationName) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
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, transformprotected 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 MuleExceptionevent - the current mule event.MuleExceptionprotected abstract MuleEvent doProcess(MuleEvent event) throws Exception
event - the mule eventExceptionprotected final Object findOrCreate(Class<?> moduleClass, boolean shouldAutoCreate, MuleEvent muleEvent) throws IllegalAccessException, InstantiationException, ConfigurationException, RegistrationException
public final void overwritePayload(MuleEvent event, Object resultPayload) throws Exception
Exceptionpublic void initialise()
throws InitialisationException
initialise in interface InitialisableInitialisationExceptionpublic void start()
throws MuleException
start in interface StartableMuleExceptionpublic void stop()
throws MuleException
stop in interface StoppableMuleExceptionpublic void dispose()
dispose in interface Disposablepublic final void setMuleContext(MuleContext value)
setMuleContext in interface MuleContextAwarevalue - Value to setpublic final MuleContext getMuleContext()
public final void setFlowConstruct(FlowConstruct value)
setFlowConstruct in interface FlowConstructAwarevalue - 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–2016 MuleSoft, Inc.. All rights reserved.