Save This Page
Home » jboss-5.0.0.CR1-src » org.jboss.mx » server » [javadoc | source]
org.jboss.mx.server
public class: MBeanServerImpl [javadoc | source]
java.lang.Object
   org.jboss.mx.server.MBeanServerImpl

All Implemented Interfaces:
    ServerConstants, ModelMBeanConstants, MBeanServer, ServiceConstants

MBean server implementation. The MBean server behaviour can be configured by setting the following system properties: The loader repository is used for managing class loaders in the MBean server. The default repository uses the UnifiedLoaderRepository implementation ( DEFAULT_LOADER_REPOSITORY_CLASS ).

The default registry is ( DEFAULT_MBEAN_REGISTRY_CLASS ).

The RequiredModelMBean uses XMBean implementation by default ( DEFAULT_REQUIRED_MODELMBEAN_CLASS ).

Field Summary
protected  MBeanServer outer    The wrapping MBeanServer 
protected  MBeanRegistry registry    Registry used by this server to map MBean object names to resource references. 
Constructor:
 public MBeanServerImpl(String defaultDomain,
    MBeanServer outer,
    MBeanServerDelegate delegate) 
    Creates an MBean server implementation with a given default domain name and registers the mandatory server delegate MBean to the server ( MBEAN_SERVER_DELEGATE ).
    Parameters:
    defaultDomain - default domain name
    outer - the wrapping MBeanServer, passed to MBeans at registration.
    delegate - the delegate to use for Notifications.
Method from org.jboss.mx.server.MBeanServerImpl Summary:
addNotificationListener,   addNotificationListener,   createMBean,   createMBean,   createMBean,   createMBean,   createRegistry,   deserialize,   deserialize,   deserialize,   getAttribute,   getAttributes,   getClassLoader,   getClassLoaderFor,   getClassLoaderRepository,   getDefaultDomain,   getDomains,   getMBeanCount,   getMBeanInfo,   getObjectInstance,   handleInstantiateExceptions,   instantiate,   instantiate,   instantiate,   instantiate,   instantiate,   invoke,   isInstanceOf,   isRegistered,   queryMBean,   queryMBeans,   queryNames,   registerMBean,   registerMBean,   registerMBean,   releaseServer,   removeNotificationListener,   removeNotificationListener,   removeNotificationListener,   removeNotificationListener,   setAttribute,   setAttributes,   toString,   unregisterMBean
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.mx.server.MBeanServerImpl Detail:
 public  void addNotificationListener(ObjectName name,
    NotificationListener listener,
    NotificationFilter filter,
    Object handback) throws InstanceNotFoundException 
    Adds a listener to a registered MBean. A notification emitted by the MBean will be forwarded by the MBeanServer to the listener. If the source of the notification is a reference to the MBean object, the MBean server will replace it by the MBean's ObjectName. Otherwise the source is unchanged.
 public  void addNotificationListener(ObjectName name,
    ObjectName listener,
    NotificationFilter filter,
    Object handback) throws InstanceNotFoundException 
    Adds a listener to a registered MBean. A notification emitted by the MBean will be forwarded by the MBeanServer to the listener. If the source of the notification is a reference to the MBean object, the MBean server will replace it by the MBean's ObjectName. Otherwise the source is unchanged. The listener object that receives notifications is the one that is registered with the given name at the time this method is called. Even if it is subsequently unregistered, it will continue to receive notifications.
 public ObjectInstance createMBean(String className,
    ObjectName name) throws MBeanRegistrationException, InstanceAlreadyExistsException, NotCompliantMBeanException, ReflectionException, MBeanException 
 public ObjectInstance createMBean(String className,
    ObjectName name,
    ObjectName loaderName) throws InstanceNotFoundException, MBeanRegistrationException, InstanceAlreadyExistsException, NotCompliantMBeanException, ReflectionException, MBeanException 
 public ObjectInstance createMBean(String className,
    ObjectName name,
    Object[] params,
    String[] signature) throws MBeanRegistrationException, InstanceAlreadyExistsException, NotCompliantMBeanException, ReflectionException, MBeanException 
 public ObjectInstance createMBean(String className,
    ObjectName name,
    ObjectName loaderName,
    Object[] params,
    String[] signature) throws InstanceNotFoundException, MBeanRegistrationException, InstanceAlreadyExistsException, NotCompliantMBeanException, ReflectionException, MBeanException 
 protected MBeanRegistry createRegistry(String defaultDomain) 
 public ObjectInputStream deserialize(ObjectName name,
    byte[] data) throws InstanceNotFoundException, OperationsException 
Deprecated!
 public ObjectInputStream deserialize(String className,
    byte[] data) throws ReflectionException, OperationsException 
Deprecated!
 public ObjectInputStream deserialize(String className,
    ObjectName loaderName,
    byte[] data) throws InstanceNotFoundException, ReflectionException, OperationsException 
Deprecated!
 public Object getAttribute(ObjectName name,
    String attribute) throws InstanceNotFoundException, ReflectionException, AttributeNotFoundException, MBeanException 
 public AttributeList getAttributes(ObjectName name,
    String[] attributes) throws InstanceNotFoundException, ReflectionException 
 public ClassLoader getClassLoader(ObjectName name) throws InstanceNotFoundException 
 public ClassLoader getClassLoaderFor(ObjectName name) throws InstanceNotFoundException 
 public ClassLoaderRepository getClassLoaderRepository() 
    Retrieve the classloader repository for this mbean server
 public String getDefaultDomain() 
 public String[] getDomains() 
 public Integer getMBeanCount() 
 public MBeanInfo getMBeanInfo(ObjectName name) throws IntrospectionException, InstanceNotFoundException, ReflectionException 
 public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException 
 protected  void handleInstantiateExceptions(Throwable t,
    String className) throws ReflectionException, MBeanException 
    Handles errors thrown during class instantiation
 public Object instantiate(String className) throws ReflectionException, MBeanException 
 public Object instantiate(String className,
    ObjectName loaderName) throws InstanceNotFoundException, ReflectionException, MBeanException 
 public Object instantiate(String className,
    Object[] params,
    String[] signature) throws ReflectionException, MBeanException 
 public Object instantiate(String className,
    ObjectName loaderName,
    Object[] params,
    String[] signature) throws InstanceNotFoundException, ReflectionException, MBeanException 
 protected Object instantiate(String className,
    ClassLoader cl,
    Object[] params,
    String[] signature) throws ReflectionException, MBeanException 
    Instantiate an object, the passed classloader is set as the thread's context classloader for the duration of this method.
 public Object invoke(ObjectName name,
    String operationName,
    Object[] params,
    String[] signature) throws InstanceNotFoundException, ReflectionException, MBeanException 
 public boolean isInstanceOf(ObjectName name,
    String className) throws InstanceNotFoundException 
 public boolean isRegistered(ObjectName name) 
 protected boolean queryMBean(ObjectName objectName,
    QueryExp queryExp) 
    Query an MBean against the query
 public Set queryMBeans(ObjectName name,
    QueryExp query) 
 public Set queryNames(ObjectName name,
    QueryExp query) 
 public ObjectInstance registerMBean(Object object,
    ObjectName name) throws MBeanRegistrationException, InstanceAlreadyExistsException, NotCompliantMBeanException 
    Registers a pre-existing object as an MBean with the MBean server. If the object name given is null, the MBean must provide its own name by implementing the MBeanRegistration interface and returning the name from the preRegister method.
 protected ObjectInstance registerMBean(Object mbean,
    ObjectName name,
    ObjectName loaderName) throws InstanceNotFoundException, MBeanRegistrationException, InstanceAlreadyExistsException, NotCompliantMBeanException, ReflectionException, MBeanException 
    Register an MBean

    The classloader is used as the thread context classloader during access to the mbean and it's interceptors

 protected ObjectInstance registerMBean(Object object,
    ObjectName name,
    ClassLoader cl) throws MBeanRegistrationException, InstanceAlreadyExistsException, NotCompliantMBeanException 
    Register an MBean

    The classloader is used as the thread context classloader during access to the mbean and it's interceptors

 public  void releaseServer() 
 public  void removeNotificationListener(ObjectName name,
    NotificationListener listener) throws ListenerNotFoundException, InstanceNotFoundException 
    Removes a listener from a registered MBean. If the listener is registered more than once, perhaps with different filters or callbacks, this method will remove all those registrations.
 public  void removeNotificationListener(ObjectName name,
    ObjectName listener) throws ListenerNotFoundException, InstanceNotFoundException 
    Removes a listener from a registered MBean. If the listener is registered more than once, perhaps with different filters or callbacks, this method will remove all those registrations.
 public  void removeNotificationListener(ObjectName name,
    NotificationListener listener,
    NotificationFilter filter,
    Object handback) throws ListenerNotFoundException, InstanceNotFoundException 
    Removes a listener from a registered MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed. The filter and handback parameters may be null if and only if they are null in a listener to be removed.
 public  void removeNotificationListener(ObjectName name,
    ObjectName listener,
    NotificationFilter filter,
    Object handback) throws ListenerNotFoundException, InstanceNotFoundException 
    Removes a listener from a registered MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed. The filter and handback parameters may be null if and only if they are null in a listener to be removed.
 public  void setAttribute(ObjectName name,
    Attribute attribute) throws InstanceNotFoundException, InvalidAttributeValueException, ReflectionException, AttributeNotFoundException, MBeanException 
 public AttributeList setAttributes(ObjectName name,
    AttributeList attributes) throws InstanceNotFoundException, ReflectionException 
 public String toString() 
    Simple toString() revealing default domain
 public  void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException