com.tivoli.jmx.connector.rmi
Interface MBeanServerConnection

All Known Implementing Classes:
MBeanServerConnectionImpl, MBeanServerConnectionImpl_Stub

public interface MBeanServerConnection
extends java.rmi.Remote

MBeanServerConnection.java

Version:
1.1
Author:
Ward Harold

Method Summary
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName name)
          Instantiates and registers an MBean in the MBean server.
 java.lang.Object getAttribute(javax.management.ObjectName name, java.lang.String attribute)
          Gets the value of a specific attribute of a named MBean.
 javax.management.AttributeList getAttributes(javax.management.ObjectName name, java.lang.String[] attributes)
          Enables the values of several attributes of a named MBean.
 java.lang.String getDefaultDomain()
          Returns the default domain used for naming the MBean.
 java.lang.Integer getMBeanCount()
          Returns the number of MBeans registered in the MBean server.
 javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
          This method discovers the attributes and operations that an MBean exposes for management.
 javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name)
          Gets the ObjectInstance for a given MBean registered with the MBean server.
 java.lang.Object invoke(javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
          Invokes an operation on an MBean.
 boolean isInstanceOf(javax.management.ObjectName name, java.lang.String className)
          Returns true if the MBean specified is an instance of the specified class, false otherwise.
 boolean isRegistered(javax.management.ObjectName name)
          Checks whether an MBean, identified by its object name, is already registered with the MBean server.
 java.util.Set queryMBeans(javax.management.ObjectName name, javax.management.QueryExp query)
          Gets MBeans controlled by the MBean server.
 java.util.Set queryNames(javax.management.ObjectName name, javax.management.QueryExp query)
          Gets the names of MBeans controlled by the MBean server.
 void setAttribute(javax.management.ObjectName name, javax.management.Attribute attribute)
          Sets the value of a specific attribute of a named MBean.
 javax.management.AttributeList setAttributes(javax.management.ObjectName name, javax.management.AttributeList attributes)
          Sets the values of several attributes of a named MBean.
 void unregisterMBean(javax.management.ObjectName name)
          Links the connection to an MBeanServer instance.
 

Method Detail

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName name)
                                            throws java.rmi.RemoteException
Instantiates and registers an MBean in the MBean server.
Parameters:
className - java.lang.String
name - javax.management.ObjectName
Returns:
javax.management.ObjectInstance

getAttribute

public java.lang.Object getAttribute(javax.management.ObjectName name,
                                     java.lang.String attribute)
                              throws java.rmi.RemoteException
Gets the value of a specific attribute of a named MBean. The MBean is identified by its object name.
Parameters:
name - javax.management.ObjectName
attribute - java.lang.String
Returns:
java.lang.Object

getAttributes

public javax.management.AttributeList getAttributes(javax.management.ObjectName name,
                                                    java.lang.String[] attributes)
                                             throws java.rmi.RemoteException
Enables the values of several attributes of a named MBean. The MBean is identified by its object name.
Parameters:
name - javax.management.ObjectName
attributes - java.lang.String[]
Returns:
javax.management.AttributeList

getDefaultDomain

public java.lang.String getDefaultDomain()
                                  throws java.rmi.RemoteException
Returns the default domain used for naming the MBean. The default domain name is used as the domain part in the ObjectName of MBeans if no domain is specified by the user
Returns:
java.lang.String

getMBeanCount

public java.lang.Integer getMBeanCount()
                                throws java.rmi.RemoteException
Returns the number of MBeans registered in the MBean server.
Returns:
java.lang.Integer

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
                                        throws java.rmi.RemoteException
This method discovers the attributes and operations that an MBean exposes for management.
Parameters:
name - javax.management.ObjectName
Returns:
javax.management.MBeanInfo

getObjectInstance

public javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name)
                                                  throws java.rmi.RemoteException
Gets the ObjectInstance for a given MBean registered with the MBean server.
Parameters:
name - javax.management.ObjectName
Returns:
javax.management.ObjectInstance

invoke

public java.lang.Object invoke(javax.management.ObjectName name,
                               java.lang.String operationName,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
                        throws java.rmi.RemoteException
Invokes an operation on an MBean.
Parameters:
name - javax.management.ObjectName
operationName - java.lang.String
params - java.lang.Object[]
signature - java.lang.String[]
Returns:
java.lang.Object

isInstanceOf

public boolean isInstanceOf(javax.management.ObjectName name,
                            java.lang.String className)
                     throws java.rmi.RemoteException
Returns true if the MBean specified is an instance of the specified class, false otherwise.
Parameters:
name - javax.management.ObjectName
className - java.lang.String
Returns:
boolean

isRegistered

public boolean isRegistered(javax.management.ObjectName name)
                     throws java.rmi.RemoteException
Checks whether an MBean, identified by its object name, is already registered with the MBean server.
Parameters:
name - javax.management.ObjectName
Returns:
boolean

queryMBeans

public java.util.Set queryMBeans(javax.management.ObjectName name,
                                 javax.management.QueryExp query)
                          throws java.rmi.RemoteException
Gets MBeans controlled by the MBean server. This method allows any of the following to be obtained: All MBeans, a set of MBeans specified by pattern matching on the ObjectName and/or a Query expression, a specific MBean. When the object name is null or no domain and key properties are specified, all objects are to be selected (and filtered if a query is specified). It returns the set of ObjectInstance objects (containing the ObjectName and the Java Class name) for the selected MBeans.
Parameters:
name - javax.management.ObjectName
query - javax.management.QueryExp
Returns:
java.util.Set

queryNames

public java.util.Set queryNames(javax.management.ObjectName name,
                                javax.management.QueryExp query)
                         throws java.rmi.RemoteException
Gets the names of MBeans controlled by the MBean server. This method enables any of the following to be obtained: The names of all MBeans, the names of a set of MBeans specified by pattern matching on the ObjectName and/or a Query expression, a specific MBean name (equivalent to testing whether an MBean is registered). When the object name is null or no domain and key properties are specified, all objects are selected (and filtered if a query is specified). It returns the set of ObjectNames for the MBeans selected.
Parameters:
name - javax.management.ObjectName
query - javax.management.QueryExp
Returns:
java.util.Set

setAttribute

public void setAttribute(javax.management.ObjectName name,
                         javax.management.Attribute attribute)
                  throws java.rmi.RemoteException
Sets the value of a specific attribute of a named MBean. The MBean is identified by its object name.
Parameters:
name - javax.management.ObjectName
attribute - javax.management.Attribute

setAttributes

public javax.management.AttributeList setAttributes(javax.management.ObjectName name,
                                                    javax.management.AttributeList attributes)
                                             throws java.rmi.RemoteException
Sets the values of several attributes of a named MBean. The MBean is identified by its object name
Parameters:
name - javax.management.ObjectName
attributes - javax.management.AttributeList
Returns:
javax.management.AttributeList

unregisterMBean

public void unregisterMBean(javax.management.ObjectName name)
                     throws java.rmi.RemoteException
Links the connection to an MBeanServer instance.
Parameters:
name - javax.management.ObjectName