org.apache.synapse.mediators.spring

## 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
    Constructor and Description
    `SpringMediator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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`

    - ### 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)

    - #### isContentAltering

          public boolean isContentAltering()

      Specified by:
        `isContentAltering` in interface `org.apache.synapse.Mediator`
      Overrides:
        `isContentAltering` in class `org.apache.synapse.mediators.AbstractMediator`

    - #### 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–2017 Apache Software Foundation. All rights reserved.