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;
}
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;
}
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;
}
Aggregations