org.apache.synapse.mediators.spring
Class SpringMediator
java.lang.Object
org.apache.synapse.mediators.AbstractMediator
org.apache.synapse.mediators.spring.SpringMediator
- All Implemented Interfaces:
- AspectConfigurable, ManagedLifecycle, Mediator, SynapseArtifact
public class SpringMediator
- extends AbstractMediator
- implements ManagedLifecycle
This mediator allows Spring beans implementing the org.apache.synapse.Mediator
interface to mediate messages passing through Synapse.
A Spring mediator is instantiated by Spring (see www.springframework.org). The mediator
refers to a Spring bean name, and also either a Spring configuration defined to Synapse
or an in-lined Spring configuration.
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 |
SpringMediator
public SpringMediator()
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
- Parameters:
synCtx
- the current message for mediation
- Returns:
- true if further mediation should continue
setBeanName
public void setBeanName(String beanName)
getBeanName
public String getBeanName()
getConfigKey
public String getConfigKey()
setConfigKey
public void setConfigKey(String configKey)
getAppContext
public org.springframework.context.ApplicationContext getAppContext()
setAppContext
public void setAppContext(org.springframework.context.ApplicationContext appContext)
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.