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

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

public class IterateMediator
extends AbstractMediator
implements ManagedLifecycle

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
IterateMediator()
           
 
Method Summary
 void destroy()
          This method should implement the destroying of the implemented parts of the configuration.
 SynapseXPath getAttachPath()
           
 SynapseXPath getExpression()
           
 String getId()
           
 Target getTarget()
           
 void init(SynapseEnvironment se)
          This method should implement the initialization of the implemented parts of the configuration.
 boolean isContinueParent()
           
 boolean isPreservePayload()
           
 boolean mediate(MessageContext synCtx)
          Splits the message by iterating over the results of the given XPath expression
 void setAttachPath(SynapseXPath attachPath)
           
 void setContinueParent(boolean continueParent)
           
 void setExpression(SynapseXPath expression)
           
 void setId(String id)
           
 void setPreservePayload(boolean preservePayload)
           
 void setTarget(Target target)
           
 
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

IterateMediator

public IterateMediator()
Method Detail

mediate

public boolean mediate(MessageContext synCtx)
Splits the message by iterating over the results of the given XPath expression

Specified by:
mediate in interface Mediator
Parameters:
synCtx - - MessageContext to be mediated
Returns:
boolean false if need to stop processing of the parent message

isContinueParent

public boolean isContinueParent()

setContinueParent

public void setContinueParent(boolean continueParent)

isPreservePayload

public boolean isPreservePayload()

setPreservePayload

public void setPreservePayload(boolean preservePayload)

getExpression

public SynapseXPath getExpression()

setExpression

public void setExpression(SynapseXPath expression)

getAttachPath

public SynapseXPath getAttachPath()

setAttachPath

public void setAttachPath(SynapseXPath attachPath)

getTarget

public Target getTarget()

setTarget

public void setTarget(Target target)

getId

public String getId()

setId

public void setId(String id)

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.