FileDocCategorySizeDatePackage
WebServiceHandlerChainNode.javaAPI DocGlassfish v2 API5835Fri May 04 22:31:38 BST 2007com.sun.enterprise.deployment.node

WebServiceHandlerChainNode

public class WebServiceHandlerChainNode extends DisplayableComponentNode

Fields Summary
private static final XMLElement
tag
Constructors Summary
public WebServiceHandlerChainNode()


      
        super();
        registerElementHandler
            (new XMLElement(WebServicesTagNames.HANDLER),
             WebServiceHandlerNode.class, "addHandler");
    
Methods Summary
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();
        table.put(WebServicesTagNames.SERVICE_NAME_PATTERN, "setServiceNamePattern");
        table.put(WebServicesTagNames.PORT_NAME_PATTERN, "setPortNamePattern");
        table.put(WebServicesTagNames.PROTOCOL_BINDINGS, "setProtocolBindings");
        return table;
    
protected XMLElementgetXMLRootTag()

return
the XML tag associated with this XMLNode

        return tag;
    
public voidsetElementValue(XMLElement element, java.lang.String value)
receives notification of the value for a particular tag

param
element the xml element
param
value it's associated value

        super.setElementValue(element, value);
    
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.WebServiceHandlerChain handler)
write the method descriptor class to a query-method DOM tree and return it

param
parent node in the DOM tree
param
node name for the root element of this xml fragment
param
the descriptor to write
return
the DOM tree top node

        
        Node wshNode = super.writeDescriptor(parent, nodeName, handler);

        if(handler.getServiceNamePattern() != null) {
            appendTextChild(wshNode, 
                        WebServicesTagNames.SERVICE_NAME_PATTERN,
                        handler.getServiceNamePattern());
        }
        if(handler.getPortNamePattern() != null) {
            appendTextChild(wshNode, 
                        WebServicesTagNames.PORT_NAME_PATTERN,
                        handler.getPortNamePattern());
        }
        if(handler.getProtocolBindings() != null) {
            appendTextChild(wshNode, 
                        WebServicesTagNames.PROTOCOL_BINDINGS,
                        handler.getProtocolBindings());
        }
        WebServiceHandlerNode handlerNode = new WebServiceHandlerNode();
        handlerNode.writeWebServiceHandlers(wshNode, handler.getHandlers());
        return wshNode;
    
public voidwriteWebServiceHandlerChains(org.w3c.dom.Node parent, java.util.List handlerChain)

        // If there are HanderChains, add the <handler-chains> node before adding
        // individual <handler-chain> nodes
        if(handlerChain.size() != 0) {
            parent = super.writeDescriptor(parent, WebServicesTagNames.HANDLER_CHAINS, null);
        }
        for(Iterator iter = handlerChain.iterator(); iter.hasNext();) {
            WebServiceHandlerChain next = (WebServiceHandlerChain) iter.next();
            writeDescriptor(parent, WebServicesTagNames.HANDLER_CHAIN, next);
        }