站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

XMLMetaData (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


org.jboss.mx.metadata
Class XMLMetaData

java.lang.Object
  extended byorg.jboss.mx.metadata.AbstractBuilder
      extended byorg.jboss.mx.metadata.XMLMetaData
All Implemented Interfaces:
MetaDataBuilder, ModelMBeanConstants, ServiceConstants, XMBeanConstants

public class XMLMetaData
extends AbstractBuilder
implements ServiceConstants, XMBeanConstants

Aggregate builder for XML schemas. This builder implementation is used as an aggregate for all XML based builder implementations. The correct XML parser is picked based on the schema declaration of the XML file.

Author:
Juha Lindfors., Dimitris Andreadis., Matt Munz

Field Summary
 
Fields inherited from class org.jboss.mx.metadata.AbstractBuilder
properties
 
Fields inherited from interface org.jboss.mx.service.ServiceConstants
JBOSSMX_DOMAIN, JBOSSMX_XMBEAN_DTD_1_0, JBOSSMX_XMBEAN_DTD_1_1, JBOSSMX_XMBEAN_DTD_1_2, MBEAN_LOADER_DTD_1_0, PERSISTENCE_TIMER, PUBLIC_JBOSSMX_XMBEAN_DTD_1_0, PUBLIC_JBOSSMX_XMBEAN_DTD_1_1, PUBLIC_JBOSSMX_XMBEAN_DTD_1_2
 
Fields inherited from interface org.jboss.mx.modelmbean.XMBeanConstants
DESCRIPTOR, GET_METHOD_ATTRIBUTE, METADATA_DESCRIPTOR_PREFIX, RESOURCE_DESCRIPTOR_PREFIX, RESOURCE_REFERENCE, RESOURCE_TYPE, SAX_PARSER, SET_METHOD_ATTRIBUTE, STANDARD_INTERFACE, STANDARD_MBEAN, XMBEAN_DESCRIPTOR_PREFIX, XML_VALIDATION
 
Fields inherited from interface org.jboss.mx.modelmbean.ModelMBeanConstants
ACTION, ACTION_INFO, ALL_DESCRIPTORS, ATTRIBUTE_DESCRIPTOR, ATTRIBUTE_VALUE, CACHE_ALWAYS, CACHE_ALWAYS_LIMIT, CACHE_NEVER, CACHE_NEVER_LIMIT, CACHED_VALUE, CLASS, CONSTRUCTOR_DESCRIPTOR, CURRENCY_TIME_LIMIT, DEFAULT, DELEGATING_PM_OPERATION_DEFAULT_VALUE, DELEGATING_PM_OPERATION_DESCRIPTOR, DELEGATING_PM_SERVICE_DEFAULT_VALUE, DELEGATING_PM_SERVICE_DESCRIPTOR, DESCRIPTOR_TYPE, DISPLAY_NAME, EXPORT, GENERIC_MODELMBEAN_NOTIFICATION, GET_METHOD, HIGH_VISIBILITY, INFO, INTERCEPTORS, IS_IS, IS_READABLE, IS_WRITABLE, LAST_RETURNED_TIME_STAMP, LAST_UPDATED_TIME_STAMP, LAST_UPDATED_TIME_STAMP2, LOG, LOG_FILE, LOW_VISIBILITY, MBEAN_DESCRIPTOR, MBEAN_INFO_INJECTION_TYPE, MBEAN_SERVER_INJECTION_TYPE, MESSAGE_ID, MINIMAL_VISIBILITY, NAME, NORMAL_VISIBILITY, NOTIFICATION_DESCRIPTOR, OBJECT_NAME, OBJECT_NAME_INJECTION_TYPE, OBJECT_REF, OPERATION_DESCRIPTOR, PERSIST_INFO, PERSIST_LOCATION, PERSIST_NAME, PERSIST_PERIOD, PERSIST_POLICIES, PERSIST_POLICY, PERSISTENCE_MANAGER, PP_ALWAYS, PP_NEVER, PP_NO_MORE_OFTEN_THAN, PP_ON_TIMER, PP_ON_UPDATE, PRESENTATION_STRING, PROTOCOL_MAP, RESOURCE_CLASS, ROLE, ROLE_CONSTRUCTOR, ROLE_GETTER, ROLE_OPERATION, ROLE_SETTER, SET_METHOD, SEVERITY, SEVERITY_CRITICAL, SEVERITY_MAJOR, SEVERITY_MINOR, SEVERITY_NON_RECOVERABLE, SEVERITY_NORMAL, SEVERITY_UNKNOWN, SEVERITY_WARNING, TARGET_OBJECT, TARGET_TYPE, VISIBILITY
 
Constructor Summary
XMLMetaData(String mmbClassName, String resourceClassName, org.dom4j.Element element, String version)
          Creates a new XMLMetaData instance using an explicit DOM element as the configuration source, and requiring an explicit version indicator.
XMLMetaData(String mmbClassName, String resourceClassName, String url)
          Constructs an aggregate XML builder implementation.
XMLMetaData(String mmbClassName, String resourceClassName, String url, Map properties)
          Constructs an aggregate XML builder implementation.
XMLMetaData(String mmbClassName, String resourceClassName, URL url)
          Constructs an aggregate XML builder implementation.
XMLMetaData(String mmbClassName, String resourceClassName, URL url, Map properties)
          Constructs an aggregate XML builder implementation.
 
Method Summary
 MBeanInfo build()
          Constructs the Model MBean metadata.
 
Methods inherited from class org.jboss.mx.metadata.AbstractBuilder
getBooleanProperty, getProperties, getProperty, getStringProperty, setProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLMetaData

public XMLMetaData(String mmbClassName,
                   String resourceClassName,
                   URL url)
Constructs an aggregate XML builder implementation.

Parameters:
mmbClassName - the class name of the Model MBean implementation
resourceClassName - the class name of the resource object the Model MBean represents
url - the URL for the XML definition of the management interface

XMLMetaData

public XMLMetaData(String mmbClassName,
                   String resourceClassName,
                   String url)
            throws MalformedURLException
Constructs an aggregate XML builder implementation.

Parameters:
mmbClassName - the class name of the Model MBean implementation
resourceClassName - the class name of the resource object the Model MBean represents
url - the URL for the XML definition of the management interface
Throws:
MalformedURLException - if the URL string could not be resolved

XMLMetaData

public XMLMetaData(String mmbClassName,
                   String resourceClassName,
                   URL url,
                   Map properties)
Constructs an aggregate XML builder implementation.

Parameters:
mmbClassName - the class name of the Model MBean implementation
resourceClassName - the class name of the resource object the Model MBean represents
url - the URL for the XML definition of the management interface
properties - Map of configuration properties for this builder. These properties will be passed to the appropriate XML schema specific builder when it is created.

XMLMetaData

public XMLMetaData(String mmbClassName,
                   String resourceClassName,
                   String url,
                   Map properties)
            throws MalformedURLException
Constructs an aggregate XML builder implementation.

Parameters:
mmbClassName - the class name of the Model MBean implementation
resourceClassName - the class name of the resource object the Model MBean represents
url - the URL for the XML definition of the management interface
properties - Map of configuration properties for this builder. These properties will be passed to the appropriate XML schema specific builder when it is created.
Throws:
MalformedURLException - if the URL string could not be resolved

XMLMetaData

public XMLMetaData(String mmbClassName,
                   String resourceClassName,
                   org.dom4j.Element element,
                   String version)
Creates a new XMLMetaData instance using an explicit DOM element as the configuration source, and requiring an explicit version indicator. The version should be the PublicID for the dtd or (worse) the dtd url.

Parameters:
mmbClassName - a String value
resourceClassName - a String value
element - an org.w3c.dom.Element value
version - a String value
Method Detail

build

public MBeanInfo build()
                throws NotCompliantMBeanException
Constructs the Model MBean metadata. This implementation reads the document type definition from the beginning of the XML file and picks a corresponding XML builder based on the schema name. In case no document type is defined the latest schema builder for this JBossMX release is used.

The SAX parser implementation is selected by default based on JAXP configuration. If you want to use JAXP to select the parser, you can set the system property "javax.xml.parsers.SAXParserFactory". For example, to use Xerces you might define:


    java -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl ...

 
In case you can't or don't want to use JAXP to configure the SAX parser implementation you can override the SAX parser implementation by setting an MBean descriptor field XMBeanConstants.SAX_PARSER to the parser class string value.

Specified by:
build in interface MetaDataBuilder
Specified by:
build in class AbstractBuilder
Returns:
initialized MBean info
Throws:
NotCompliantMBeanException - if there were errors building the MBean info from the given XML file.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.