private static final QName ENDPOINT_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "endpoint");
private static final QName RECEIVING_SEQUENCE = new QName(XMLConfigConstants.RECEIVE);
public Mediator createSpecificMediator(OMElement elem, Properties properties) {
SendMediator sm = new SendMediator();
// after successfully creating the mediator
// set its common attributes such as tracing etc
processAuditStatus(sm,elem);
OMElement epElement = elem.getFirstChildWithName(ENDPOINT_Q);
if (epElement != null) {
// create the endpoint and set it in the send mediator
Endpoint endpoint = EndpointFactory.getEndpointFromElement(epElement, true, properties);
if (endpoint != null) {
sm.setEndpoint(endpoint);
}
}
String receivingSequence = elem.getAttributeValue(RECEIVING_SEQUENCE);
if (receivingSequence != null) {
ValueFactory valueFactory = new ValueFactory();
Value value = valueFactory.createValue(XMLConfigConstants.RECEIVE, elem);
sm.setReceivingSequence(value);
}
return sm;
}