You can write your own custom configurator for the
Mediator implementation you write without relying on the Class Mediator or Spring extension for its initialization.
MediatorFactoryimplementation - Defines how to digest a custom XML configuration element to be used to create and configure the custom mediator instance.
MediatorSerializerimplementation - Defines how a configuration should be serialized back into an XML configuration.
MediatorSerializer implementations and the mediator class/es must be bundled as an OSGi bundle exporting these classes and placed into the
ESB_HOME/repository/components/dropins folder, so that the Synapse runtime could find and load the definition.
A custom JAR file must bundle your classes implementing the
MediatorSerializer and the
MediatorFactory interfaces. It should also contain two text files named
org.apache.synapse.config.xml.MediatorSerializer which will contain the fully qualified name(s) of your
MediatorSerializer implementation classes. Any dependencies should be made available through OSGi bundles in the same plugins directory.
MediatorFactory interface listing, which you should implement, is given below and its
getTagQName() method must define the fully qualified element of interest for custom configuration. The Synapse initialization will call back to this
MediatorFactory instance through the
createMediator(OMElement elem) method passing in this XML element, so that an instance of the mediator could be created utilizing the custom XML specification and returned.