Class CloneMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- org.apache.synapse.mediators.eip.splitter.CloneMediator
-
- All Implemented Interfaces:
AspectConfigurable,ManagedLifecycle,Mediator,FlowContinuableMediator,SynapseArtifact
public class CloneMediator extends AbstractMediator implements ManagedLifecycle, FlowContinuableMediator
This mediator will clone the message into multiple messages and mediate as specified in the target elements. A target specifies or refers to a sequence or an endpoint, and optionally specifies an Action and/or To address to be set to the cloned message. The number of cloned messages created is the number of targets specified
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
-
-
Constructor Summary
Constructors Constructor Description CloneMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTarget(Target target)voiddestroy()This method should implement the destroying of the implemented parts of the configuration.ValuegetDynamicIterationsValue()StringgetId()StringgetIterations()List<Target>getTargets()voidinit(SynapseEnvironment se)This method should implement the initialization of the implemented parts of the configuration.booleanisContentAltering()This is used to indicate whether message payload get modified during mediationbooleanisContinueParent()booleanisSequential()booleanmediate(MessageContext synCtx)This will implement the mediate method of the Mediator interface and will provide the functionality of cloning message into the specified targets and mediationbooleanmediate(MessageContext synCtx, ContinuationState continuationState)Mediate the message using a ContinuationState.IntegerreportOpenStatistics(MessageContext messageContext, boolean isContentAltering)Report Open Statistic Event for the MediatorvoidsetComponentStatisticsId(ArtifactHolder holder)voidsetContinueParent(boolean continueParent)voidsetDynamicIterationsValue(Value dynamicIterationsValue)voidsetId(String id)voidsetIterations(String iterations)voidsetSequential(boolean sequential)voidsetTargets(List<Target> targets)-
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)
This will implement the mediate method of the Mediator interface and will provide the functionality of cloning message into the specified targets and mediation
-
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)
-
getIterations
public String getIterations()
-
setIterations
public void setIterations(String iterations)
-
getDynamicIterationsValue
public Value getDynamicIterationsValue()
-
setDynamicIterationsValue
public void setDynamicIterationsValue(Value dynamicIterationsValue)
-
addTarget
public void addTarget(Target target)
-
getId
public String getId()
-
setId
public void setId(String id)
-
isSequential
public boolean isSequential()
-
setSequential
public void setSequential(boolean sequential)
-
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
-
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
-
-