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

ManagementBean (JBoss/Management API) - JBoss 4.0.1 sp1 management API Documentation 英文版文档


org.jboss.management.mejb
Class ManagementBean

java.lang.Object
  extended byorg.jboss.management.mejb.ManagementBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, Serializable, javax.ejb.SessionBean
Direct Known Subclasses:
MEJBSession

public class ManagementBean
extends Object
implements javax.ejb.SessionBean

Management Session Bean to enable the client to manage the server its is deployed on. This is the implementation of the JSR-77 specification MEJB.

Version:
$Revision: 1.17 $
Author:
Marc Fleury, Andreas Schaefer, Scott.Stark@jboss.org
See Also:
Serialized Form

Constructor Summary
ManagementBean()
           
 
Method Summary
 void addNotificationListener(javax.management.ObjectName pBroadcaster, javax.management.ObjectName pListener, javax.management.NotificationFilter pFilter, Object pHandback)
           
 javax.management.ObjectInstance createMBean(String pClass, javax.management.ObjectName pName, Object[] pParameters, String[] pSignature)
           
 void ejbActivate()
          The activate method is called when the instance is activated from its "passive" state.
 void ejbCreate()
          Create the Session Bean which takes the first available MBeanServer as target server
 void ejbPassivate()
          The passivate method is called before the instance enters the "passive" state.
 void ejbRemove()
          A container invokes this method before it ends the life of the session object.
 Object getAttribute(javax.management.ObjectName pName, String pAttribute)
           
 javax.management.AttributeList getAttributes(javax.management.ObjectName pName, String[] pAttributes)
           
 String getDefaultDomain()
           
 javax.management.j2ee.ListenerRegistration getListenerRegistry()
           
 Integer getMBeanCount()
           
 javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName pName)
           
 Object invoke(javax.management.ObjectName pName, String pOperationName, Object[] pParams, String[] pSignature)
           
 boolean isRegistered(javax.management.ObjectName pName)
           
 Set queryNames(javax.management.ObjectName pName, javax.management.QueryExp pQuery)
           
 void removeNotificationListener(javax.management.ObjectName pBroadcaster, javax.management.ObjectName pListener)
           
 void setAttribute(javax.management.ObjectName pName, javax.management.Attribute pAttribute)
           
 javax.management.AttributeList setAttributes(javax.management.ObjectName pName, javax.management.AttributeList pAttributes)
           
 void setSessionContext(javax.ejb.SessionContext aContext)
          Set the associated session context.
 String toString()
          Describes the instance and its content for debugging purpose
 void unregisterMBean(javax.management.ObjectName pName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagementBean

public ManagementBean()
Method Detail

getAttribute

public Object getAttribute(javax.management.ObjectName pName,
                           String pAttribute)
                    throws javax.management.MBeanException,
                           javax.management.AttributeNotFoundException,
                           javax.management.InstanceNotFoundException,
                           javax.management.ReflectionException,
                           RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException

getAttributes

public javax.management.AttributeList getAttributes(javax.management.ObjectName pName,
                                                    String[] pAttributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.InstanceNotFoundException
javax.management.ReflectionException

getDefaultDomain

public String getDefaultDomain()
                        throws RemoteException
Throws:
RemoteException - Necessary for a EJB

getMBeanCount

public Integer getMBeanCount()
                      throws RemoteException
Throws:
RemoteException - Necessary for a EJB

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName pName)
                                        throws javax.management.IntrospectionException,
                                               javax.management.InstanceNotFoundException,
                                               javax.management.ReflectionException,
                                               RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.IntrospectionException
javax.management.InstanceNotFoundException
javax.management.ReflectionException

getListenerRegistry

public javax.management.j2ee.ListenerRegistration getListenerRegistry()
                                                               throws RemoteException
Throws:
RemoteException - Necessary for a EJB

invoke

public Object invoke(javax.management.ObjectName pName,
                     String pOperationName,
                     Object[] pParams,
                     String[] pSignature)
              throws javax.management.InstanceNotFoundException,
                     javax.management.MBeanException,
                     javax.management.ReflectionException,
                     RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

isRegistered

public boolean isRegistered(javax.management.ObjectName pName)
                     throws RemoteException
Throws:
RemoteException - Necessary for a EJB

queryNames

public Set queryNames(javax.management.ObjectName pName,
                      javax.management.QueryExp pQuery)
               throws RemoteException
Throws:
RemoteException - Necessary for a EJB

setAttribute

public void setAttribute(javax.management.ObjectName pName,
                         javax.management.Attribute pAttribute)
                  throws javax.management.AttributeNotFoundException,
                         javax.management.InstanceNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException,
                         RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException

setAttributes

public javax.management.AttributeList setAttributes(javax.management.ObjectName pName,
                                                    javax.management.AttributeList pAttributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException,
                                                    RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.InstanceNotFoundException
javax.management.ReflectionException

createMBean

public javax.management.ObjectInstance createMBean(String pClass,
                                                   javax.management.ObjectName pName,
                                                   Object[] pParameters,
                                                   String[] pSignature)
                                            throws javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanException,
                                                   javax.management.MBeanRegistrationException,
                                                   javax.management.NotCompliantMBeanException,
                                                   javax.management.ReflectionException,
                                                   RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.InstanceAlreadyExistsException
javax.management.MBeanException
javax.management.MBeanRegistrationException
javax.management.NotCompliantMBeanException
javax.management.ReflectionException

unregisterMBean

public void unregisterMBean(javax.management.ObjectName pName)
                     throws javax.management.InstanceNotFoundException,
                            javax.management.MBeanRegistrationException,
                            RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.InstanceNotFoundException
javax.management.MBeanRegistrationException

addNotificationListener

public void addNotificationListener(javax.management.ObjectName pBroadcaster,
                                    javax.management.ObjectName pListener,
                                    javax.management.NotificationFilter pFilter,
                                    Object pHandback)
                             throws javax.management.InstanceNotFoundException,
                                    RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.InstanceNotFoundException

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName pBroadcaster,
                                       javax.management.ObjectName pListener)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       RemoteException
Throws:
RemoteException - Necessary for a EJB
javax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Create the Session Bean which takes the first available MBeanServer as target server

Throws:
javax.ejb.CreateException

toString

public String toString()
Describes the instance and its content for debugging purpose

Returns:
Debugging information about the instance and its content

setSessionContext

public void setSessionContext(javax.ejb.SessionContext aContext)
                       throws javax.ejb.EJBException
Set the associated session context. The container invokes this method on an instance after the instance has been created.

This method is called with no transaction context.

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
aContext - A SessionContext interface for the instance. The instance should store the reference to the context in an instance variable.
Throws:
javax.ejb.EJBException - Should something go wrong while seting the context, an EJBException will be thrown.

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException
The activate method is called when the instance is activated from its "passive" state. The instance should acquire any resource that it has released earlier in the ejbPassivate() method.

This method is called with no transaction context.

Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException - Thrown by the method to indicate a failure caused by a system-level error

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException
The passivate method is called before the instance enters the "passive" state. The instance should release any resources that it can re-acquire later in the ejbActivate() method.

After the passivate method completes, the instance must be in a state that allows the container to use the Java Serialization protocol to externalize and store away the instance's state.

This method is called with no transaction context.

Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException - Thrown by the method to indicate a failure caused by a system-level error

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException
A container invokes this method before it ends the life of the session object. This happens as a result of a client's invoking a remove operation, or when a container decides to terminate the session object after a timeout.

This method is called with no transaction context.

Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException - Thrown by the method to indicate a failure caused by a system-level error


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