Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.management.j2ee
Interface Management

All Superinterfaces:
  EJBObject, java.rmi.Remote

public interface Management
extends EJBObject

The Management interface provides the APIs to navigate and manipulate managed objects. The J2EE Management EJB component (MEJB) must implement this as its remote interface.

Author:
  Hans Hrasna

Method Summary
`java.lang.Object` | `getAttribute(ObjectName name, java.lang.String attribute)` Gets the value of a specific attribute of a named managed object.
`AttributeList` | `getAttributes(ObjectName name, java.lang.String[] attributes)` Enables the values of several attributes of a named managed object.
`java.lang.String` | `getDefaultDomain()` Returns the default domain name of this MEJB.
`ListenerRegistration` | `getListenerRegistry()` Returns the listener registry implementation for this MEJB.
`java.lang.Integer` | `getMBeanCount()` Returns the number of managed objects registered in the MEJB.
`MBeanInfo` | `getMBeanInfo(ObjectName name)` This method discovers the attributes and operations that a managed object exposes for management.
`java.lang.Object` | `invoke(ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)` Invokes an operation on a managed object.
`boolean` | `isRegistered(ObjectName name)` Checks whether a managed object, identified by its object name, is already registered with the MEJB.
`java.util.Set` | `queryNames(ObjectName name, QueryExp query)` Gets the names of managed objects controlled by the MEJB.
`void` | `setAttribute(ObjectName name, Attribute attribute)` Sets the value of a specific attribute of a named managed object.
`AttributeList` | `setAttributes(ObjectName name, AttributeList attributes)` Sets the values of several attributes of a named managed object.

Methods inherited from interface javax.ejb.EJBObject
`getEJBHome, getHandle, getPrimaryKey, isIdentical, remove`

Method Detail

### queryNames

    public java.util.Set queryNames(ObjectName name,
                                    QueryExp query)
                             throws java.rmi.RemoteException

  Gets the names of managed objects controlled by the MEJB. This method enables any of the following to be obtained: The names of all managed objects, the names of a set of managed objects specified by pattern matching on the `ObjectName`, a specific managed object name (equivalent to testing whether a managed object is registered). When the object name is null or no domain and key properties are specified, all objects are selected. It returns the set of J2EEObjectNames for the managed objects selected.

  Parameters:
    `name` - The object name pattern identifying the managed objects to be retrieved. If null or no domain and key properties are specified, all the managed objects registered will be retrieved.
  Returns:
    A set containing the ObjectNames for the managed objects selected. If no managed object satisfies the query, an empty set is returned.
  Throws:
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### isRegistered

    public boolean isRegistered(ObjectName name)
                         throws java.rmi.RemoteException

  Checks whether a managed object, identified by its object name, is already registered with the MEJB.

  Parameters:
    `name` - The object name of the managed object to be checked.
  Returns:
    True if the managed object is already registered in the MEJB, false otherwise.
  Throws:
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### getMBeanCount

    public java.lang.Integer getMBeanCount()
                                    throws java.rmi.RemoteException

  Returns the number of managed objects registered in the MEJB.

  Throws:
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### getMBeanInfo

    public MBeanInfo getMBeanInfo(ObjectName name)
                           throws IntrospectionException,
                                  InstanceNotFoundException,
                                  ReflectionException,
                                  java.rmi.RemoteException

  This method discovers the attributes and operations that a managed object exposes for management.

  Parameters:
    `name` - The name of the managed object to analyze
  Returns:
    An instance of `MBeanInfo` allowing the retrieval of all attributes and operations of this managed object.
  Throws:
    `IntrospectionException` - An exception occurs during introspection.
    `InstanceNotFoundException` - The managed object specified is not found.
    `ReflectionException` - An exception occurred when trying to perform reflection on a managed object
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### getAttribute

    public java.lang.Object getAttribute(ObjectName name,
                                         java.lang.String attribute)
                                  throws MBeanException,
                                         AttributeNotFoundException,
                                         InstanceNotFoundException,
                                         ReflectionException,
                                         java.rmi.RemoteException

  Gets the value of a specific attribute of a named managed object. The managed object is identified by its object name.

  Parameters:
    `name` - The object name of the managed object from which the attribute is to be retrieved.
    `attribute` - A String specifying the name of the attribute to be retrieved.
  Returns:
    The value of the retrieved attribute.
  Throws:
    `AttributeNotFoundException` - The attribute specified is not accessible in the managed object.
    `MBeanException` - Wraps an exception thrown by the managed object's getter.
    `InstanceNotFoundException` - The managed object specified is not registered in the MEJB.
    `ReflectionException` - An exception occurred when trying to invoke the getAttribute method of a Dynamic MBean
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### getAttributes

    public AttributeList getAttributes(ObjectName name,
                                       java.lang.String[] attributes)
                                throws InstanceNotFoundException,
                                       ReflectionException,
                                       java.rmi.RemoteException

  Enables the values of several attributes of a named managed object. The managed object is identified by its object name.

  Parameters:
    `name` - The object name of the managed object from which the attributes are retrieved.
    `attributes` - A list of the attributes to be retrieved.
  Returns:
    The list of the retrieved attributes.
  Throws:
    `InstanceNotFoundException` - The managed object specified is not registered in the MEJB.
    `ReflectionException` - An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### setAttribute

    public void setAttribute(ObjectName name,
                             Attribute attribute)
                      throws InstanceNotFoundException,
                             AttributeNotFoundException,
                             InvalidAttributeValueException,
                             MBeanException,
                             ReflectionException,
                             java.rmi.RemoteException

  Sets the value of a specific attribute of a named managed object. The managed object is identified by its object name.

  Parameters:
    `name` - The name of the managed object within which the attribute is to be set.
    `attribute` - The identification of the attribute to be set and the value it is to be set to.
  Throws:
    `InstanceNotFoundException` - The managed object specified is not registered in the MEJB.
    `AttributeNotFoundException` - The attribute specified is not accessible in the managed object.
    `InvalidAttributeValueException` - The value specified for the attribute is not valid.
    `MBeanException` - Wraps an exception thrown by the managed object's setter.
    `ReflectionException` - An exception occurred when trying to invoke the setAttribute method of a Dynamic MBean.
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### setAttributes

    public AttributeList setAttributes(ObjectName name,
                                       AttributeList attributes)
                                throws InstanceNotFoundException,
                                       ReflectionException,
                                       java.rmi.RemoteException

  Sets the values of several attributes of a named managed object. The managed object is identified by its object name.

  Parameters:
    `name` - The object name of the managed object within which the attributes are to be set.
    `attributes` - A list of attributes: The identification of the attributes to be set and the values they are to be set to.
  Returns:
    The list of attributes that were set, with their new values.
  Throws:
    `InstanceNotFoundException` - The managed object specified is not registered in the MEJB.
    `ReflectionException` - An exception occurred when trying to invoke the setAttributes method of a Dynamic MBean.
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### invoke

    public java.lang.Object invoke(ObjectName name,
                                   java.lang.String operationName,
                                   java.lang.Object[] params,
                                   java.lang.String[] signature)
                            throws InstanceNotFoundException,
                                   MBeanException,
                                   ReflectionException,
                                   java.rmi.RemoteException

  Invokes an operation on a managed object.

  Parameters:
    `name` - The object name of the managed object on which the method is to be invoked.
    `operationName` - The name of the operation to be invoked.
    `params` - An array containing the parameters to be set when the operation is invoked
    `signature` - An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the managed object on which the operation was invoked.
  Returns:
    The object returned by the operation, which represents the result of invoking the operation on the managed object specified.
  Throws:
    `InstanceNotFoundException` - The managed object specified is not registered in the MEJB.
    `MBeanException` - Wraps an exception thrown by the managed object's invoked method.
    `ReflectionException` - Wraps a `java.lang.Exception` thrown while trying to invoke the method.
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### getDefaultDomain

    public java.lang.String getDefaultDomain()
                                      throws java.rmi.RemoteException

  Returns the default domain name of this MEJB.

  Throws:
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

### getListenerRegistry

    public ListenerRegistration getListenerRegistry()
                                             throws java.rmi.RemoteException

  Returns the listener registry implementation for this MEJB. The listener registry implements the methods that enable clints to add and remove event notification listeners managed objects

  Returns:
    An implementation of `javax.management.j2ee.ListenerRegistration`
  Throws:
    `java.rmi.RemoteException` - A communication exception occurred during the execution of a remote method call

Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.