Save This Page
Home » JBoss-5.1.0 » org.jboss.mx » modelmbean » [javadoc | source]
org.jboss.mx.modelmbean
public class: XMBean [javadoc | source]
java.lang.Object
   org.jboss.mx.server.AbstractMBeanInvoker
      org.jboss.mx.modelmbean.ModelMBeanInvoker
         org.jboss.mx.modelmbean.XMBean

All Implemented Interfaces:
    XMBeanConstants, NotificationListener, ModelMBean, ModelMBeanConstants, MBeanInvoker

XMBean implementation.
Fields inherited from org.jboss.mx.modelmbean.ModelMBeanInvoker:
log,  resourceType,  persistence,  notifier,  notifierSequence,  attrNotifierSequence
Fields inherited from org.jboss.mx.server.AbstractMBeanInvoker:
preRegisterInfo,  resourceEntry,  dynamicResource,  info,  attributeContextMap,  operationContextMap,  constructorContextMap,  getMBeanInfoCtx,  preRegisterCtx,  postRegisterCtx,  preDeregisterCtx,  postDeregisterCtx,  log
Constructor:
 public XMBean() throws MBeanException 
    Default constructor for the XMBean Model MBean implementation. This creates an uninitialized Model MBean template.
 public XMBean(ModelMBeanInfo info) throws MBeanException 
    Creates an XMBean Model MBean implementation with a predefined JMX metadata.
    Parameters:
    info - Model MBean metadata describing this MBean template
 public XMBean(Descriptor descriptor) throws MBeanException, NotCompliantMBeanException 
 public XMBean(Object resource,
    String resourceType) throws MBeanException, NotCompliantMBeanException 
    Creates a XMBean instance with a given resource object and resource type.

    This Model MBean implementation supports the following resource types:

    
      -  OBJECT_REF 
      -  STANDARD_INTERFACE 
      -  DESCRIPTOR 
      - Any valid URL string to a *.xml file.
    
    
    OBJECT_REF: resource object can be any Java object. The management interface must be set separately via setModelMBeanInfo method.

    STANDARD_INTERFACE: the resource object is assumed to follow the Standard MBean naming conventions to expose its management interface, including implementing a xxxMBean interface. A corresponding Model MBean metadata is generated for the Model MBean representing this resource type.

    DESCRIPTOR: the resource object is wrapped as a part of the Descriptor object passed to this Model MBean instance. The descriptor object must contain the mandatory fields RESOURCE_REFERENCE and RESOURCE_TYPE that identify the correct resource reference and type used for this Model MBean instance. The descriptor object may also contain additional fields, such as SAX_PARSER and XML_VALIDATION that are passed as configuration properties for the metadata builder instances. Any additional descriptor fields that match the METADATA_DESCRIPTOR_PREFIX naming pattern will be passed to the builder implementation via its setProperty method.

    URL String: if a resource type string contains an URL that ends with a *.xml file name the resource object is exposed via the XML management interface definition read from this URL. The XML parser implementation is picked based on the schema definition in the XML document.

    Parameters:
    resource - resource object or descriptor
    resourceType - resource type string or URL to *.xml file
 public XMBean(Object resource,
    URL interfaceURL) throws MBeanException, NotCompliantMBeanException 
 public XMBean(Object resource,
    Element element,
    String version) throws MBeanException, NotCompliantMBeanException 
 public XMBean(Object resource,
    Element element,
    String version) throws MBeanException, NotCompliantMBeanException 
Method from org.jboss.mx.modelmbean.XMBean Summary:
addNotificationListener,   configureInterceptorStack,   getNotificationInfo,   handleNotification,   isSupportedResourceType,   removeNotificationListener,   removeNotificationListener
Methods from org.jboss.mx.modelmbean.ModelMBeanInvoker:
addAttributeChangeNotificationListener,   addNotificationListener,   configureInterceptorStack,   getInterceptors,   getNotificationInfo,   init,   initAttributeContexts,   initOperationContexts,   initPersistence,   invokePreRegister,   isSupportedResourceType,   load,   override,   removeAttributeChangeNotificationListener,   removeNotificationListener,   removeNotificationListener,   sendAttributeChangeNotification,   sendAttributeChangeNotification,   sendNotification,   sendNotification,   setManagedResource,   setModelMBeanInfo,   setValuesFromMBeanInfo,   store
Methods from org.jboss.mx.server.AbstractMBeanInvoker:
addNotificationListener,   addNotificationListenerToResource,   addOperationInterceptor,   getAttribute,   getAttributes,   getInvocationTimeout,   getMBeanEntry,   getMBeanInfo,   getMetaData,   getNotificationInfo,   getNotificationInfoFromResource,   getObjectName,   getResource,   getServer,   getSignatureString,   initAttributeContexts,   initDispatchers,   initOperationContexts,   inject,   invoke,   invokePostDeregister,   invokePostRegister,   invokePreDeregister,   invokePreRegister,   isSuspended,   override,   postDeregister,   postRegister,   preDeregister,   preRegister,   removeNotificationListener,   removeNotificationListener,   removeNotificationListenerFromResource,   removeNotificationListenerFromResource,   removeOperationInterceptor,   resume,   setAttribute,   setAttributes,   setInvocationTimeout,   setMBeanEntry,   setResource,   suspend,   suspend,   suspend,   updateAttributeInfo
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.mx.modelmbean.XMBean Detail:
 public  void addNotificationListener(NotificationListener listener,
    NotificationFilter filter,
    Object handback) 
 protected  void configureInterceptorStack(ModelMBeanInfo info,
    MBeanServer server,
    ObjectName name) throws Exception 
 public MBeanNotificationInfo[] getNotificationInfo() 
 public  void handleNotification(Notification notification,
    Object handback) 
    Implements NotificationListener interface by simply forwarding any received Notification to the wrapped resource, if it implements the NotificationListener interface, too. This is needed to allow the wrapped resource to register for Notifications using the XMBean ObjectName, rather than its own "this" reference - dimitris
 public boolean isSupportedResourceType(Object resource,
    String resourceType) 
 public  void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException 
 public  void removeNotificationListener(NotificationListener listener,
    NotificationFilter filter,
    Object handback) throws ListenerNotFoundException