write the descriptor class to a DOM tree and return it
if (! (descriptor instanceof InboundResourceAdapter)) {
throw new IllegalArgumentException(getClass() + " cannot handle descriptors of type " + descriptor.getClass());
}
Iterator msgListeners = ((InboundResourceAdapter)descriptor).getMessageListeners().iterator();
if (!msgListeners.hasNext()) {
throw new RuntimeException("There must be at least one messagelistener for this inbound resource adapter");
}
//message listeners
for (;msgListeners.hasNext();) {
MessageListener msgListener = (MessageListener) msgListeners.next();
Node msgListenerNode = appendChild(parent, ConnectorTagNames.MSG_LISTENER);
appendTextChild(msgListenerNode, ConnectorTagNames.MSG_LISTENER_TYPE, msgListener.getMessageListenerType());
//activation spec node
ActivationSpecNode actSpecNode = new ActivationSpecNode();
msgListenerNode = actSpecNode.writeDescriptor(msgListenerNode, msgListener);
}
return parent;