FileDocCategorySizeDatePackage
CheckpointAtEndOfMethodNode.javaAPI DocGlassfish v2 API4968Fri May 04 22:31:42 BST 2007com.sun.enterprise.deployment.node.runtime

CheckpointAtEndOfMethodNode

public class CheckpointAtEndOfMethodNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
This node handles the checkpoint-at-end-of-method runtime deployment descriptors

Fields Summary
protected com.sun.enterprise.deployment.runtime.CheckpointAtEndOfMethodDescriptor
descriptor
Constructors Summary
public CheckpointAtEndOfMethodNode()
Creates new CheckpointAtEndOfMethodNode

    
        
      
        registerElementHandler(new XMLElement(RuntimeTagNames.METHOD), MethodNode.class);   
    
Methods Summary
public voidaddDescriptor(java.lang.Object newDescriptor)
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode

param
descriptor the new descriptor

        if (newDescriptor instanceof MethodDescriptor) {
            descriptor.addMethodDescriptor(
                (MethodDescriptor) newDescriptor);
        }
    
public java.lang.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

        if (descriptor==null) {
            descriptor = new CheckpointAtEndOfMethodDescriptor();
            Object parentDesc = getParentNode().getDescriptor();
            if (parentDesc instanceof EjbDescriptor) {
                descriptor.setEjbDescriptor((EjbDescriptor)parentDesc);
            }
        }
        return descriptor;
    
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.CheckpointAtEndOfMethodDescriptor checkpointMethodDescriptor)
write the descriptor class to a DOM tree and return it

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

    
	Node checkpointMethodNode = super.writeDescriptor(parent, nodeName, 
            checkpointMethodDescriptor);
        ArrayList methodDescs = checkpointMethodDescriptor.getConvertedMethodDescs();
        if (!methodDescs.isEmpty()) {
            MethodNode methodNode = new MethodNode();
            for (Iterator methodIterator = methodDescs.iterator();
                methodIterator.hasNext();) {
                MethodDescriptor methodDesc = 
                    (MethodDescriptor) methodIterator.next();
                // do not write out ejb-name element for the method
                methodNode.writeDescriptor(checkpointMethodNode, 
                    RuntimeTagNames.METHOD, methodDesc, null);
            }
        }

	return checkpointMethodNode;