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 voidaddExpressionForParamName(String pName, Value expr)voiddestroy()This method should implement the destroying of the implemented parts of the configuration.StringgetErrorHandler()ValuegetKey()StringgetPackageName()Map<String,Value>getpName2ExpressionMap()StringgetTargetTemplate()voidinit(SynapseEnvironment se)This method should implement the initialization of the implemented parts of the configuration.booleanisContentAware()booleanisDynamicMediator()booleanmediate(MessageContext synCtx)Invokes the mediator passing the current message for mediation.booleanmediate(MessageContext synCtx, ContinuationState continuationState)Mediate the message using a ContinuationState.voidsetComponentStatisticsId(ArtifactHolder holder)voidsetDynamicMediator(boolean dynamicMediator)voidsetErrorHandler(String errorHandler)voidsetKey(Value key)voidsetPackageName(String packageName)voidsetTargetTemplate(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:MediatorInvokes 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:
isContentAwarein interfaceMediator- Overrides:
isContentAwarein classAbstractMediator
-
mediate
public boolean mediate(MessageContext synCtx, ContinuationState continuationState)
Description copied from interface:FlowContinuableMediatorMediate the message using a ContinuationState. This is used when mediating the response message when service is invoked using a Call Mediator.- Specified by:
mediatein 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:ManagedLifecycleThis method should implement the initialization of the implemented parts of the configuration.- Specified by:
initin interfaceManagedLifecycle- Parameters:
se- SynapseEnvironment to be used for initialization
-
destroy
public void destroy()
Description copied from interface:ManagedLifecycleThis method should implement the destroying of the implemented parts of the configuration.- Specified by:
destroyin interfaceManagedLifecycle
-
setComponentStatisticsId
public void setComponentStatisticsId(ArtifactHolder holder)
- Specified by:
setComponentStatisticsIdin interfaceMediator- Overrides:
setComponentStatisticsIdin classAbstractMediator
-
-