Search in sources :

Example 6 with LogMediator

use of org.apache.synapse.mediators.builtin.LogMediator in project wso2-synapse by wso2.

the class SynapseConfigUtils method setDefaultMainSequence.

/**
 * Return the main sequence if one is not defined. This implementation defaults to
 * a simple sequence with a <send/>
 *
 * @param config the configuration to be updated
 */
public static void setDefaultMainSequence(SynapseConfiguration config) {
    SequenceMediator main = new SequenceMediator();
    main.setName(SynapseConstants.MAIN_SEQUENCE_KEY);
    main.addChild(new LogMediator());
    main.addChild(new DropMediator());
    config.addSequence(SynapseConstants.MAIN_SEQUENCE_KEY, main);
    // set the aspect configuration
    AspectConfiguration configuration = new AspectConfiguration(main.getName());
    main.configure(configuration);
}
Also used : LogMediator(org.apache.synapse.mediators.builtin.LogMediator) DropMediator(org.apache.synapse.mediators.builtin.DropMediator) SequenceMediator(org.apache.synapse.mediators.base.SequenceMediator) AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Aggregations

LogMediator (org.apache.synapse.mediators.builtin.LogMediator)6 SequenceMediator (org.apache.synapse.mediators.base.SequenceMediator)3 AspectConfiguration (org.apache.synapse.aspects.AspectConfiguration)2 DropMediator (org.apache.synapse.mediators.builtin.DropMediator)2 OMAttribute (org.apache.axiom.om.OMAttribute)1 OMElement (org.apache.axiom.om.OMElement)1 SynapseException (org.apache.synapse.SynapseException)1 MediatorProperty (org.apache.synapse.mediators.MediatorProperty)1 SendMediator (org.apache.synapse.mediators.builtin.SendMediator)1 InMediator (org.apache.synapse.mediators.filters.InMediator)1 OutMediator (org.apache.synapse.mediators.filters.OutMediator)1 SynapseXPath (org.apache.synapse.util.xpath.SynapseXPath)1 JaxenException (org.jaxen.JaxenException)1