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

BeanPoolNode

public class BeanPoolNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
This node handles the bean-pool runtime deployment descriptors
author
Jerome Dochez
version

Fields Summary
protected com.sun.enterprise.deployment.runtime.BeanPoolDescriptor
descriptor
Constructors Summary
Methods Summary
public java.lang.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

    
                    
       
        if (descriptor==null) {
	    descriptor = new BeanPoolDescriptor();
	}
        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 dispatchTable = super.getDispatchTable();
	dispatchTable.put(RuntimeTagNames.STEADY_POOL_SIZE, "setSteadyPoolSize");
	dispatchTable.put(RuntimeTagNames.POOL_RESIZE_QUANTITY, "setPoolResizeQuantity");
	dispatchTable.put(RuntimeTagNames.MAX_POOL_SIZE, "setMaxPoolSize");
	dispatchTable.put(RuntimeTagNames.POOL_IDLE_TIMEOUT_IN_SECONDS, "setPoolIdleTimeoutInSeconds");
	dispatchTable.put(RuntimeTagNames.MAX_WAIT_TIME_IN_MILLIS, "setMaxWaitTimeInMillis");
	return dispatchTable;
    
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.BeanPoolDescriptor descriptor)
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 beanpoolNode = super.writeDescriptor(parent, nodeName, descriptor);
	appendTextChild(beanpoolNode, RuntimeTagNames.STEADY_POOL_SIZE, descriptor.getSteadyPoolSize());
	appendTextChild(beanpoolNode, RuntimeTagNames.POOL_RESIZE_QUANTITY, descriptor.getPoolResizeQuantity());
	appendTextChild(beanpoolNode, RuntimeTagNames.MAX_POOL_SIZE, descriptor.getMaxPoolSize());
	appendTextChild(beanpoolNode, RuntimeTagNames.POOL_IDLE_TIMEOUT_IN_SECONDS, descriptor.getPoolIdleTimeoutInSeconds());
	appendTextChild(beanpoolNode, RuntimeTagNames.MAX_WAIT_TIME_IN_MILLIS, descriptor.getMaxWaitTimeInMillis());
	return beanpoolNode;