org.apache.synapse.mediators.spring
Class SpringMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by org.apache.synapse.mediators.spring.SpringMediator
All Implemented Interfaces:
org.apache.synapse.aspects.AspectConfigurable, org.apache.synapse.ManagedLifecycle, org.apache.synapse.Mediator, org.apache.synapse.SynapseArtifact

public class SpringMediator
extends org.apache.synapse.mediators.AbstractMediator
implements org.apache.synapse.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.


Field Summary
 
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
 
Constructor Summary
SpringMediator()
           
 
Method Summary
 void destroy()
           
 org.springframework.context.ApplicationContext getAppContext()
           
 String getBeanName()
           
 String getConfigKey()
           
 void init(org.apache.synapse.core.SynapseEnvironment se)
           
 boolean mediate(org.apache.synapse.MessageContext synCtx)
           
 void setAppContext(org.springframework.context.ApplicationContext appContext)
           
 void setBeanName(String beanName)
           
 void setConfigKey(String configKey)
           
 
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getInputType, getLog, getMediatorPosition, getOutputType, getShortDescription, getTraceState, getType, handleException, handleException, isContentAware, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringMediator

public SpringMediator()
Method Detail

mediate

public boolean mediate(org.apache.synapse.MessageContext synCtx)
Specified by:
mediate in interface org.apache.synapse.Mediator

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(org.apache.synapse.core.SynapseEnvironment se)
Specified by:
init in interface org.apache.synapse.ManagedLifecycle

destroy

public void destroy()
Specified by:
destroy in interface org.apache.synapse.ManagedLifecycle


Copyright © 2005–2015 Apache Software Foundation. All rights reserved.