Package org.jboss.jca.web.console
Class Server
java.lang.Object
org.jboss.jca.web.console.Server
Utility methods related to the MBeanServer interface
- Author:
- Scott Stark, Dimitris Andreadis, Jesper Pedersen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IteratorGet the domain datastatic StringgetMBeanAttribute(String name, String attrName) Get MBean attributestatic ObjectgetMBeanAttributeObject(String name, String attrName) Get MBean attribute objectstatic AttrResultInfogetMBeanAttributeResultInfo(String name, MBeanAttributeInfo attrInfo) Get MBean attribute result infostatic MBeanDatagetMBeanData(String name) Get MBean datastatic MBeanServerGet the platform MBeanServer instancestatic MBeanServergetMBeanServer(String domain) Get the MBeanServer instancestatic OpResultInfoInvoke an operationstatic OpResultInfoinvokeOpByName(String name, String opName, String[] argTypes, String[] args) Invoke an operation by namestatic AttributeListsetAttributes(String name, HashMap attributes) Set MBean attributes
-
Constructor Details
-
Server
public Server()
-
-
Method Details
-
getMBeanServer
Get the platform MBeanServer instance- Returns:
- The instance
-
getMBeanServer
Get the MBeanServer instance- Parameters:
domain- The domain- Returns:
- The instance
-
getDomainData
Get the domain data- Returns:
- The data iterator
- Throws:
JMException- Thrown if an error occurs
-
getMBeanData
Get MBean data- Parameters:
name- The bean name- Returns:
- The data
- Throws:
JMException- Thrown if an error occurs
-
getMBeanAttributeObject
Get MBean attribute object- Parameters:
name- The bean nameattrName- The attribute name- Returns:
- The data
- Throws:
JMException- Thrown if an error occurs
-
getMBeanAttribute
Get MBean attribute- Parameters:
name- The bean nameattrName- The attribute name- Returns:
- The data
- Throws:
JMException- Thrown if an error occurs
-
getMBeanAttributeResultInfo
public static AttrResultInfo getMBeanAttributeResultInfo(String name, MBeanAttributeInfo attrInfo) throws JMException Get MBean attribute result info- Parameters:
name- The bean nameattrInfo- The attribute information- Returns:
- The data
- Throws:
JMException- Thrown if an error occurs
-
setAttributes
Set MBean attributes- Parameters:
name- The bean nameattributes- The attributes- Returns:
- The updated attribute list
- Throws:
JMException- Thrown if an error occurs
-
invokeOp
Invoke an operation- Parameters:
name- The bean nameindex- The method indexargs- The arguments- Returns:
- The result
- Throws:
JMException- Thrown if an error occurs
-
invokeOpByName
public static OpResultInfo invokeOpByName(String name, String opName, String[] argTypes, String[] args) throws JMException Invoke an operation by name- Parameters:
name- The bean nameopName- The operation nameargTypes- The argument typesargs- The arguments- Returns:
- The result
- Throws:
JMException- Thrown if an error occurs
-