org.objectweb.jonas.jmx
Class JonasManagementRepr
java.lang.Object
org.objectweb.jonas.jmx.JonasManagementRepr
- public class JonasManagementRepr
- extends java.lang.Object
Wraper class. Apply the management operations on the ManagementRep instance.
- Author:
- Adriana Danes
Method Summary |
static void |
addServerRepr(java.lang.String serverName,
ManagementRepr repr)
|
static java.lang.Object |
getAttribute(javax.management.ObjectName on,
java.lang.String attribute,
java.lang.String serverName)
|
static java.lang.Object |
getAttributes(javax.management.ObjectName on,
java.lang.String attribute,
java.lang.String serverName)
|
static javax.naming.Context |
getContext(java.lang.String serverName)
|
static javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName name,
java.lang.String serverName)
|
static ManagementRepr |
getServerRepr(java.lang.String serverName)
|
static java.lang.Object |
invoke(javax.management.ObjectName on,
java.lang.String operation,
java.lang.Object[] param,
java.lang.String[] signature,
java.lang.String serverName)
|
static boolean |
isRegistered(javax.management.ObjectName on,
java.lang.String serverName)
|
static boolean |
isServerRepr(java.lang.String serverName)
|
static boolean |
noServerRepr()
|
static java.util.Set |
queryNames(javax.management.ObjectName on,
java.lang.String serverName)
|
static void |
setAttribute(javax.management.ObjectName on,
java.lang.String attribute,
java.lang.Object value,
java.lang.String serverName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JonasManagementRepr
public JonasManagementRepr()
addServerRepr
public static void addServerRepr(java.lang.String serverName,
ManagementRepr repr)
noServerRepr
public static boolean noServerRepr()
isServerRepr
public static boolean isServerRepr(java.lang.String serverName)
getServerRepr
public static ManagementRepr getServerRepr(java.lang.String serverName)
throws ManagementException
- Throws:
ManagementException
isRegistered
public static boolean isRegistered(javax.management.ObjectName on,
java.lang.String serverName)
throws ManagementException
- Parameters:
on
- ObjectName of the MBean we are looking forserverName
- The server name
- Returns:
- True if the MBean is already registered in the MBean server, false otherwise or if an exception is catched.
- Throws:
ManagementException
getAttribute
public static java.lang.Object getAttribute(javax.management.ObjectName on,
java.lang.String attribute,
java.lang.String serverName)
throws ManagementException
- Parameters:
on
- The ObjectName of the MBean from which the attribute is to be retrieved.attribute
- A String specifying the name of the attribute to be retrieve.serverName
- The server name
- Returns:
- The value of the attribute.
- Throws:
ManagementException
getAttributes
public static java.lang.Object getAttributes(javax.management.ObjectName on,
java.lang.String attribute,
java.lang.String serverName)
throws ManagementException
- Parameters:
on
- The ObjectName of the MBean from which the attribute is to be retrieved.attribute
- A String specifying the name of the attribute to be retrieve.serverName
- The server name
- Returns:
- The value of the attribute.
- Throws:
ManagementException
setAttribute
public static void setAttribute(javax.management.ObjectName on,
java.lang.String attribute,
java.lang.Object value,
java.lang.String serverName)
throws ManagementException
- Parameters:
on
- The ObjectName of the MBean within which the attribute is to be set.serverName
- The server nameattribute
- A String specifying the name of the attribute to be retrieve.value
- The value to set to the attribute.
- Throws:
ManagementException
invoke
public static java.lang.Object invoke(javax.management.ObjectName on,
java.lang.String operation,
java.lang.Object[] param,
java.lang.String[] signature,
java.lang.String serverName)
throws ManagementException
- Parameters:
on
- param
- invoke parameterssignature
- invoke parameters signatureserverName
- The server name
- Throws:
ManagementException
queryNames
public static java.util.Set queryNames(javax.management.ObjectName on,
java.lang.String serverName)
throws ManagementException
- Parameters:
serverName
- The server name
- Returns:
- A set containing the ObjectNames for the MBeans selected.
- Throws:
ManagementException
getMBeanInfo
public static javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name,
java.lang.String serverName)
throws ManagementException
- Parameters:
name
- MBean's ObjectNameserverName
- The server name
- Returns:
- An instance of MBeanInfo allowing the retrieval of all
attributes and operations of this MBean.
- Throws:
ManagementException
getContext
public static javax.naming.Context getContext(java.lang.String serverName)
throws javax.naming.NamingException
- Returns:
- Context the current application context.
- Throws:
javax.naming.NamingException