|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.devkit.processor.ExpressionEvaluatorSupport org.mule.devkit.processor.DevkitBasedMessageProcessor
public abstract class DevkitBasedMessageProcessor
Field Summary | |
---|---|
protected FlowConstruct |
flowConstruct
Flow Construct |
protected Object |
moduleObject
Module object |
protected MuleContext |
muleContext
Mule Context |
Fields inherited from interface org.mule.api.lifecycle.Startable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Stoppable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
DevkitBasedMessageProcessor(String operationName)
|
Method Summary | |
---|---|
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 {@link org.mule.security.oauth.processor.AbstractDevkitBasedMessageProcessor. |
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()
|
Methods inherited from class org.mule.devkit.processor.ExpressionEvaluatorSupport |
---|
computeClassHierarchy, evaluate, evaluateAndTransform, evaluateAndTransform, getAccessTokenId, isAssignableFrom, isList, isListClass, isMap, isMapClass, transform, transform, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Object moduleObject
protected MuleContext muleContext
protected FlowConstruct flowConstruct
Constructor Detail |
---|
public DevkitBasedMessageProcessor(String operationName)
Method Detail |
---|
public MuleEvent process(MuleEvent event) throws MuleException
doProcess(MuleEvent)
Afterwards, it performs payload transformation by
invoking overwritePayload(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 event
Exception
protected final Object findOrCreate(Class<?> moduleClass, boolean shouldAutoCreate, MuleEvent muleEvent) throws IllegalAccessException, InstantiationException, ConfigurationException, RegistrationException
InstantiationException
ConfigurationException
IllegalAccessException
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |