Class InvokeMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- org.apache.synapse.mediators.template.InvokeMediator
-
- All Implemented Interfaces:
AspectConfigurable
,ManagedLifecycle
,Mediator
,FlowContinuableMediator
,SynapseArtifact
public class InvokeMediator extends AbstractMediator implements ManagedLifecycle, FlowContinuableMediator
This class handles invocation of a synapse function template.* ..
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
-
-
Constructor Summary
Constructors Constructor Description InvokeMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExpressionForParamName(String pName, Value expr)
void
destroy()
This method should implement the destroying of the implemented parts of the configuration.String
getErrorHandler()
Value
getKey()
String
getPackageName()
Map<String,Value>
getpName2ExpressionMap()
String
getTargetTemplate()
void
init(SynapseEnvironment se)
This method should implement the initialization of the implemented parts of the configuration.boolean
isContentAware()
boolean
isDynamicMediator()
boolean
mediate(MessageContext synCtx)
Invokes the mediator passing the current message for mediation.boolean
mediate(MessageContext synCtx, ContinuationState continuationState)
Mediate the message using a ContinuationState.void
setComponentStatisticsId(ArtifactHolder holder)
void
setDynamicMediator(boolean dynamicMediator)
void
setErrorHandler(String errorHandler)
void
setKey(Value key)
void
setPackageName(String packageName)
void
setTargetTemplate(String targetTemplate)
-
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAltering, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
-
-
-
Method Detail
-
mediate
public boolean mediate(MessageContext synCtx)
Description copied from interface:Mediator
Invokes the mediator passing the current message for mediation. Each mediator performs its mediation action, and returns true if mediation should continue, or false if further mediation should be aborted.
-
isContentAware
public boolean isContentAware()
- Specified by:
isContentAware
in interfaceMediator
- Overrides:
isContentAware
in classAbstractMediator
-
mediate
public boolean mediate(MessageContext synCtx, ContinuationState continuationState)
Description copied from interface:FlowContinuableMediator
Mediate the message using a ContinuationState. This is used when mediating the response message when service is invoked using a Call Mediator.- Specified by:
mediate
in interfaceFlowContinuableMediator
- Parameters:
synCtx
- MessageContextcontinuationState
- ContinuationState- Returns:
- whether mediation flow is completed
-
getTargetTemplate
public String getTargetTemplate()
-
setTargetTemplate
public void setTargetTemplate(String targetTemplate)
-
setErrorHandler
public void setErrorHandler(String errorHandler)
-
getErrorHandler
public String getErrorHandler()
-
isDynamicMediator
public boolean isDynamicMediator()
-
setDynamicMediator
public void setDynamicMediator(boolean dynamicMediator)
-
getKey
public Value getKey()
-
setKey
public void setKey(Value key)
-
getPackageName
public String getPackageName()
-
setPackageName
public void setPackageName(String packageName)
-
init
public void init(SynapseEnvironment se)
Description copied from interface:ManagedLifecycle
This method should implement the initialization of the implemented parts of the configuration.- Specified by:
init
in interfaceManagedLifecycle
- Parameters:
se
- SynapseEnvironment to be used for initialization
-
destroy
public void destroy()
Description copied from interface:ManagedLifecycle
This method should implement the destroying of the implemented parts of the configuration.- Specified by:
destroy
in interfaceManagedLifecycle
-
setComponentStatisticsId
public void setComponentStatisticsId(ArtifactHolder holder)
- Specified by:
setComponentStatisticsId
in interfaceMediator
- Overrides:
setComponentStatisticsId
in classAbstractMediator
-
-