Search in sources :

Example 1 with OutMediator

use of org.apache.synapse.mediators.filters.OutMediator in project wso2-synapse by wso2.

the class SynapseConfigurationBuilder method getDefaultConfiguration.

/**
 * Return the default Synapse Configuration
 * @return the default configuration to be used
 */
public static SynapseConfiguration getDefaultConfiguration() {
    // programatically create an empty configuration which just log and drop the messages
    SynapseConfiguration config = SynapseConfigUtils.newConfiguration();
    SequenceMediator mainMediator = new SequenceMediator();
    InMediator inMediator = new InMediator();
    inMediator.addChild(new LogMediator());
    mainMediator.addChild(inMediator);
    OutMediator outMediator = new OutMediator();
    outMediator.addChild(new SendMediator());
    mainMediator.addChild(outMediator);
    mainMediator.setName(SynapseConstants.MAIN_SEQUENCE_KEY);
    config.addSequence(SynapseConstants.MAIN_SEQUENCE_KEY, mainMediator);
    SequenceMediator faultMediator = new SequenceMediator();
    LogMediator fault = new LogMediator();
    fault.setLogLevel(LogMediator.FULL);
    faultMediator.addChild(fault);
    faultMediator.setName(SynapseConstants.FAULT_SEQUENCE_KEY);
    config.addSequence(SynapseConstants.FAULT_SEQUENCE_KEY, faultMediator);
    config.setDescription("The default configuration of the ESB, that is created " + "programatically at the startup");
    return config;
}
Also used : OutMediator(org.apache.synapse.mediators.filters.OutMediator) LogMediator(org.apache.synapse.mediators.builtin.LogMediator) InMediator(org.apache.synapse.mediators.filters.InMediator) SequenceMediator(org.apache.synapse.mediators.base.SequenceMediator) SendMediator(org.apache.synapse.mediators.builtin.SendMediator)

Example 2 with OutMediator

use of org.apache.synapse.mediators.filters.OutMediator in project wso2-synapse by wso2.

the class OutMediatorFactory method createSpecificMediator.

public Mediator createSpecificMediator(OMElement elem, Properties properties) {
    OutMediator filter = new OutMediator();
    // after successfully creating the mediator
    // set its common attributes such as tracing etc
    processAuditStatus(filter, elem);
    addChildren(elem, filter, properties);
    return filter;
}
Also used : OutMediator(org.apache.synapse.mediators.filters.OutMediator)

Example 3 with OutMediator

use of org.apache.synapse.mediators.filters.OutMediator in project wso2-synapse by wso2.

the class OutMediatorSerializer method serializeSpecificMediator.

public OMElement serializeSpecificMediator(Mediator m) {
    if (!(m instanceof OutMediator)) {
        handleException("Unsupported mediator passed out for serialization : " + m.getType());
    }
    OutMediator mediator = (OutMediator) m;
    OMElement out = fac.createOMElement("out", synNS);
    saveTracingState(out, mediator);
    serializeChildren(out, mediator.getList());
    return out;
}
Also used : OutMediator(org.apache.synapse.mediators.filters.OutMediator) OMElement(org.apache.axiom.om.OMElement)

Aggregations

OutMediator (org.apache.synapse.mediators.filters.OutMediator)3 OMElement (org.apache.axiom.om.OMElement)1 SequenceMediator (org.apache.synapse.mediators.base.SequenceMediator)1 LogMediator (org.apache.synapse.mediators.builtin.LogMediator)1 SendMediator (org.apache.synapse.mediators.builtin.SendMediator)1 InMediator (org.apache.synapse.mediators.filters.InMediator)1