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.
-
Field Summary
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()org.springframework.context.ApplicationContextvoidinit(org.apache.synapse.core.SynapseEnvironment se) booleanbooleanmediate(org.apache.synapse.MessageContext synCtx) voidsetAppContext(org.springframework.context.ApplicationContext appContext) voidsetBeanName(String beanName) voidsetConfigKey(String configKey) Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getArtifactIdentifier, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorId, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportCloseStatisticsWithError, reportOpenStatistics, setArtifactIdentifier, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorId, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
Constructor Details
-
SpringMediator
public SpringMediator()
-
-
Method Details
-
mediate
public boolean mediate(org.apache.synapse.MessageContext synCtx) - Specified by:
mediatein interfaceorg.apache.synapse.Mediator
-
setBeanName
-
getBeanName
-
getConfigKey
-
setConfigKey
-
getAppContext
public org.springframework.context.ApplicationContext getAppContext() -
setAppContext
public void setAppContext(org.springframework.context.ApplicationContext appContext) -
isContentAltering
public boolean isContentAltering()- Specified by:
isContentAlteringin interfaceorg.apache.synapse.Mediator- Overrides:
isContentAlteringin classorg.apache.synapse.mediators.AbstractMediator
-
init
public void init(org.apache.synapse.core.SynapseEnvironment se) - Specified by:
initin interfaceorg.apache.synapse.ManagedLifecycle
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.apache.synapse.ManagedLifecycle
-