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