Search in sources :

Example 1 with InMediator

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

the class InMediatorFactory method createSpecificMediator.

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

Example 2 with InMediator

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

the class InMediatorSerializer method serializeSpecificMediator.

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

Example 3 with InMediator

use of org.apache.synapse.mediators.filters.InMediator 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)

Aggregations

InMediator (org.apache.synapse.mediators.filters.InMediator)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 OutMediator (org.apache.synapse.mediators.filters.OutMediator)1