public Mediator createMediator(OMElement elem) {
SpringMediator sm = new SpringMediator();
OMAttribute bean = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "bean"));
OMAttribute key = elem.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "key"));
if (bean == null) {
handleException("The 'bean' attribute is required for a Spring mediator definition");
} else if (key == null) {
handleException("A 'key' attribute is required for a Spring mediator definition");
} else {
// after successfully creating the mediator
// set its common attributes such as tracing etc
processTraceState(sm,elem);
sm.setBeanName(bean.getAttributeValue());
sm.setConfigKey(key.getAttributeValue());
return sm;
}
return null;
}
Create a Spring mediator instance referring to the bean and configuration given
by the OMElement declaration |