org.apache.synapse.mediators.template
Class TemplateMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by org.apache.synapse.mediators.AbstractListMediator
          extended by org.apache.synapse.mediators.template.TemplateMediator
All Implemented Interfaces:
AspectConfigurable, ManagedLifecycle, Mediator, ListMediator, SynapseArtifact

public class TemplateMediator
extends AbstractListMediator

This mediator is responsible for handling function templates for synapse. This will parse parameters passed from an mediator and will be made available to sequences defined within this template. parameters will be accessible through synapse 'function stack'. Users should access these through an xpath extension var or function , defined under function scope ie:- $func:p1 or get-property('func','p2')


Field Summary
 
Fields inherited from class org.apache.synapse.mediators.AbstractListMediator
mediators
 
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
 
Constructor Summary
TemplateMediator()
           
 
Method Summary
 void destroy()
          Destroy child mediators recursively
 String getFileName()
           
 String getName()
           
 Collection<String> getParameters()
           
 void init(SynapseEnvironment se)
          Initialize child mediators recursively
 boolean isInitialized()
           
 boolean mediate(MessageContext synCtx)
          Invokes the mediator passing the current message for mediation.
 void setFileName(String name)
           
 void setName(String name)
           
 void setParameters(Collection<String> paramNames)
           
 
Methods inherited from class org.apache.synapse.mediators.AbstractListMediator
addAll, addChild, getChild, getList, removeChild, removeChild
 
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
 
Methods inherited from interface org.apache.synapse.Mediator
getTraceState, getType, setTraceState
 
Methods inherited from interface org.apache.synapse.SynapseArtifact
getDescription, setDescription
 

Constructor Detail

TemplateMediator

public TemplateMediator()
Method Detail

setParameters

public void setParameters(Collection<String> paramNames)

getParameters

public Collection<String> getParameters()

setName

public void setName(String name)

getName

public String getName()

mediate

public boolean mediate(MessageContext synCtx)
Description copied from interface: Mediator
Invokes 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.

Specified by:
mediate in interface Mediator
Overrides:
mediate in class AbstractListMediator
Parameters:
synCtx - the current message for mediation
Returns:
true if further mediation should continue

setFileName

public void setFileName(String name)

getFileName

public String getFileName()

init

public void init(SynapseEnvironment se)
Description copied from class: AbstractListMediator
Initialize child mediators recursively

Specified by:
init in interface ManagedLifecycle
Overrides:
init in class AbstractListMediator
Parameters:
se - synapse environment

destroy

public void destroy()
Description copied from class: AbstractListMediator
Destroy child mediators recursively

Specified by:
destroy in interface ManagedLifecycle
Overrides:
destroy in class AbstractListMediator

isInitialized

public boolean isInitialized()


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