This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Configuring Mediators

Mediators could access the Synapse registry to load resources and configure the local behavior. Refer to the Spring Mediator and Script Mediator implementations for examples on how this could be achieved.

Loading of Extensions by the Synapse Runtime

Synapse loads available extensions from the runtime classpath using the J2SE Service Provider model. This essentially iterates over the available JAR files, for a META-INF/services directory within each file, and looks for text files with the name org.apache.synapse.config.xml.MediatorFactory and org.apache.synapse.config.xml.MediatorSerializer which contains a list of fully qualified classname that implement the above interface, listing each class in a separate line. For example, the built-in synapse-extensions.jar contains the following structure:

synapse-extensions.jar
    /META-INF/services
        org.apache.synapse.config.xml.MediatorFactory
        org.apache.synapse.config.xml.MediatorSerializer
    /... the implementation classes as usual...