Class SpringMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- 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.
-
-
Constructor Summary
Constructors Constructor Description SpringMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
org.springframework.context.ApplicationContext
getAppContext()
String
getBeanName()
String
getConfigKey()
void
init(org.apache.synapse.core.SynapseEnvironment se)
boolean
isContentAltering()
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, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
-
-
-
Method Detail
-
mediate
public boolean mediate(org.apache.synapse.MessageContext synCtx)
- Specified by:
mediate
in interfaceorg.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)
-
isContentAltering
public boolean isContentAltering()
- Specified by:
isContentAltering
in interfaceorg.apache.synapse.Mediator
- Overrides:
isContentAltering
in classorg.apache.synapse.mediators.AbstractMediator
-
init
public void init(org.apache.synapse.core.SynapseEnvironment se)
- Specified by:
init
in interfaceorg.apache.synapse.ManagedLifecycle
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.apache.synapse.ManagedLifecycle
-
-