FileDocCategorySizeDatePackage
InBoundRANode.javaAPI DocGlassfish v2 API5765Fri May 04 22:31:40 BST 2007com.sun.enterprise.deployment.node.connector

InBoundRANode

public class InBoundRANode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
This node is responsible for handling the Connector DTD related inbound-resourceadapter XML tag
author
Sheetal Vartak
version

Fields Summary
private com.sun.enterprise.deployment.InboundResourceAdapter
descriptor
all sub-implementation of this class can use a dispatch table to map xml element to method name on the descriptor class for setting the element value.
Constructors Summary
public InBoundRANode()


    //default constructor
      
	registerElementHandler(new XMLElement(ConnectorTagNames.MSG_LISTENER),
			       MessageListenerNode.class); 
    
Methods Summary
public voidaddDescriptor(java.lang.Object obj)
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode

param
descriptor the new descriptor

	if (obj instanceof MessageListener) {
	    descriptor.addMessageListener((MessageListener)obj);
	}
    
private voidappendInBoundNode(org.w3c.dom.Node inBoundNode, com.sun.enterprise.deployment.InboundResourceAdapter conDesc)
method to add the child nodes of INBOUND_RESOURCE_ADAPTER


	Node msgAdapter = appendChild(inBoundNode, ConnectorTagNames.MSG_ADAPTER);

	MessageListenerNode msgListener = new MessageListenerNode();
	msgAdapter = msgListener.writeDescriptor(msgAdapter, conDesc);
    
public java.lang.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

        if (descriptor==null) {
	    // the descriptor associated with the InBoundRANode is a InboundResourceAdapter 
	    // This descriptor is available with the parent node of the InBoundRANode
	    descriptor = (InboundResourceAdapter)DescriptorFactory.getDescriptor(getXMLPath());
	    ((ConnectorDescriptor)(getParentNode().getDescriptor())).setInboundResourceAdapter(descriptor);
		   
        } 
        return descriptor;
    
protected java.util.MapgetDispatchTable()
all sub-implementation of this class can use a dispatch table to map xml element to method name on the descriptor class for setting the element value.

return
the map with the element name as a key, the setter method as a value

    
        Map table = super.getDispatchTable();
	return table;
    
public voidstartElement(com.sun.enterprise.deployment.node.XMLElement element, org.xml.sax.Attributes attributes)
SAX Parser API implementation, we don't really care for now.

     
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node connectorNode, com.sun.enterprise.deployment.Descriptor descriptor)
write the descriptor class to a DOM tree and return it

param
parent node for the DOM tree
param
the descriptor to write
return
the DOM tree top node

  
	Node inBoundNode = appendChild(connectorNode, ConnectorTagNames.INBOUND_RESOURCE_ADAPTER);
	appendInBoundNode(inBoundNode, (InboundResourceAdapter)((ConnectorDescriptor)descriptor).getInboundResourceAdapter());
	return connectorNode;