Class IterateMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- org.apache.synapse.mediators.eip.splitter.IterateMediator
-
- All Implemented Interfaces:
AspectConfigurable,ManagedLifecycle,Mediator,FlowContinuableMediator,SynapseArtifact
public class IterateMediator extends AbstractMediator implements ManagedLifecycle, FlowContinuableMediator
Splits a message using an XPath expression and creates a new message to hold each resulting element. This is very much similar to the clone mediator, and hands over the newly created messages to a target for processing
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
-
-
Constructor Summary
Constructors Constructor Description IterateMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()This method should implement the destroying of the implemented parts of the configuration.SynapsePathgetAttachPath()SynapsePathgetExpression()StringgetId()TargetgetTarget()voidinit(SynapseEnvironment se)This method should implement the initialization of the implemented parts of the configuration.booleanisAttachPathPresent()booleanisContentAltering()This is used to indicate whether message payload get modified during mediationbooleanisContinueParent()booleanisPreservePayload()booleanmediate(MessageContext synCtx)Splits the message by iterating over the results of the given Path expressionbooleanmediate(MessageContext synCtx, ContinuationState continuationState)Mediate the message using a ContinuationState.IntegerreportOpenStatistics(MessageContext messageContext, boolean isContentAltering)Report Open Statistic Event for the MediatorvoidsetAttachPath(SynapsePath attachPath)voidsetAttachPathPresent(boolean attachPathPresent)voidsetComponentStatisticsId(ArtifactHolder holder)voidsetContinueParent(boolean continueParent)voidsetExpression(SynapsePath expression)voidsetId(String id)voidsetPreservePayload(boolean preservePayload)voidsetTarget(Target target)-
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, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, setBreakPoint, setCommentsList, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
-
-
-
Method Detail
-
mediate
public boolean mediate(MessageContext synCtx)
Splits the message by iterating over the results of the given Path expression
-
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
-
isContinueParent
public boolean isContinueParent()
-
setContinueParent
public void setContinueParent(boolean continueParent)
-
isPreservePayload
public boolean isPreservePayload()
-
setPreservePayload
public void setPreservePayload(boolean preservePayload)
-
getExpression
public SynapsePath getExpression()
-
setExpression
public void setExpression(SynapsePath expression)
-
getAttachPath
public SynapsePath getAttachPath()
-
setAttachPath
public void setAttachPath(SynapsePath attachPath)
-
getTarget
public Target getTarget()
-
setTarget
public void setTarget(Target target)
-
getId
public String getId()
-
setId
public void setId(String id)
-
isContentAltering
public boolean isContentAltering()
Description copied from interface:MediatorThis is used to indicate whether message payload get modified during mediation- Specified by:
isContentAlteringin interfaceMediator- Overrides:
isContentAlteringin classAbstractMediator- Returns:
- whether mediator modify the payload
-
isAttachPathPresent
public boolean isAttachPathPresent()
-
setAttachPathPresent
public void setAttachPathPresent(boolean attachPathPresent)
-
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
-
reportOpenStatistics
public Integer reportOpenStatistics(MessageContext messageContext, boolean isContentAltering)
Description copied from interface:MediatorReport Open Statistic Event for the Mediator- Specified by:
reportOpenStatisticsin interfaceMediator- Overrides:
reportOpenStatisticsin classAbstractMediator
-
setComponentStatisticsId
public void setComponentStatisticsId(ArtifactHolder holder)
- Specified by:
setComponentStatisticsIdin interfaceMediator- Overrides:
setComponentStatisticsIdin classAbstractMediator
-
-