ClassLoaderNodepublic class ClassLoaderNode extends WebRuntimeNode node for class-loader tag |
Constructors Summary |
---|
public ClassLoaderNode()
registerElementHandler(new XMLElement(RuntimeTagNames.PROPERTY),
WebPropertyNode.class, "addWebProperty");
|
Methods Summary |
---|
protected boolean | setAttributeValue(com.sun.enterprise.deployment.node.XMLElement elementName, com.sun.enterprise.deployment.node.XMLElement attributeName, java.lang.String value)parsed an attribute of an element
RuntimeDescriptor descriptor =
(RuntimeDescriptor) getRuntimeDescriptor();
if (descriptor==null) {
throw new RuntimeException(
"Trying to set values on a null descriptor");
}
if (attributeName.getQName().equals(RuntimeTagNames.EXTRA_CLASS_PATH)) {
descriptor.setAttributeValue(ClassLoader.EXTRA_CLASS_PATH, value);
return true;
} else if (attributeName.getQName().equals(RuntimeTagNames.DELEGATE)) {
descriptor.setAttributeValue(ClassLoader.DELEGATE, value);
return true;
} else if (attributeName.getQName().equals(
RuntimeTagNames.DYNAMIC_RELOAD_INTERVAL)) {
descriptor.setAttributeValue(ClassLoader.DYNAMIC_RELOAD_INTERVAL,
value);
return true;
}
return false;
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.web.ClassLoader descriptor)write the descriptor class to a DOM tree and return it
Element classLoader = (Element) super.writeDescriptor(parent,
nodeName, descriptor);
// property*
WebProperty[] properties = descriptor.getWebProperty();
if (properties != null && properties.length > 0) {
WebPropertyNode wpn = new WebPropertyNode();
wpn.writeDescriptor(classLoader, RuntimeTagNames.PROPERTY,
properties);
}
// extra-class-path, delegate, dynamic-reload-interval
setAttribute(classLoader, RuntimeTagNames.EXTRA_CLASS_PATH, (String) descriptor.getAttributeValue(ClassLoader.EXTRA_CLASS_PATH));
setAttribute(classLoader, RuntimeTagNames.DELEGATE, (String) descriptor.getAttributeValue(ClassLoader.DELEGATE));
setAttribute(classLoader, RuntimeTagNames.DYNAMIC_RELOAD_INTERVAL, (String) descriptor.getAttributeValue(ClassLoader.DYNAMIC_RELOAD_INTERVAL));
return classLoader;
|
|