org.apache.synapse.mediators.eip.splitter
Class CloneMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by org.apache.synapse.mediators.eip.splitter.CloneMediator
All Implemented Interfaces:
AspectConfigurable, ManagedLifecycle, Mediator, SynapseArtifact

public class CloneMediator
extends AbstractMediator
implements ManagedLifecycle

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
CloneMediator()
           
 
Method Summary
 void addTarget(Target target)
           
 void destroy()
          This method should implement the destroying of the implemented parts of the configuration.
 String getId()
           
 List<Target> getTargets()
           
 void init(SynapseEnvironment se)
          This method should implement the initialization of the implemented parts of the configuration.
 boolean isContinueParent()
           
 boolean isSequential()
           
 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
 void setContinueParent(boolean continueParent)
           
 void setId(String id)
           
 void setSequential(boolean sequential)
           
 void setTargets(List<Target> targets)
           
 
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getLog, getTraceState, getType, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloneMediator

public CloneMediator()
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

Specified by:
mediate in interface Mediator
Parameters:
synCtx - - MessageContext which is subjected to the cloning
Returns:
boolean true if this needs to be further mediated (continueParent=true)

isContinueParent

public boolean isContinueParent()

setContinueParent

public void setContinueParent(boolean continueParent)

getTargets

public List<Target> getTargets()

setTargets

public void setTargets(List<Target> targets)

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)

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 interface ManagedLifecycle
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 interface ManagedLifecycle


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.