Package org.jboss.jca.web.console
Class Server
- java.lang.Object
-
- org.jboss.jca.web.console.Server
-
public class Server extends Object
Utility methods related to the MBeanServer interface- Author:
- Scott Stark, Dimitris Andreadis, Jesper Pedersen
-
-
Constructor Summary
Constructors Constructor Description Server()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IteratorgetDomainData()Get 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 MBeanServergetMBeanServer()Get the platform MBeanServer instancestatic MBeanServergetMBeanServer(String domain)Get the MBeanServer instancestatic OpResultInfoinvokeOp(String name, int index, String[] args)Invoke an operationstatic OpResultInfoinvokeOpByName(String name, String opName, String[] argTypes, String[] args)Invoke an operation by namestatic AttributeListsetAttributes(String name, HashMap attributes)Set MBean attributes
-
-
-
Method Detail
-
getMBeanServer
public static MBeanServer getMBeanServer()
Get the platform MBeanServer instance- Returns:
- The instance
-
getMBeanServer
public static MBeanServer getMBeanServer(String domain)
Get the MBeanServer instance- Parameters:
domain- The domain- Returns:
- The instance
-
getDomainData
public static Iterator getDomainData() throws JMException
Get the domain data- Returns:
- The data iterator
- Throws:
JMException- Thrown if an error occurs
-
getMBeanData
public static MBeanData getMBeanData(String name) throws JMException
Get MBean data- Parameters:
name- The bean name- Returns:
- The data
- Throws:
JMException- Thrown if an error occurs
-
getMBeanAttributeObject
public static Object getMBeanAttributeObject(String name, String attrName) throws JMException
Get MBean attribute object- Parameters:
name- The bean nameattrName- The attribute name- Returns:
- The data
- Throws:
JMException- Thrown if an error occurs
-
getMBeanAttribute
public static String getMBeanAttribute(String name, String attrName) throws JMException
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
public static AttributeList setAttributes(String name, HashMap attributes) throws JMException
Set MBean attributes- Parameters:
name- The bean nameattributes- The attributes- Returns:
- The updated attribute list
- Throws:
JMException- Thrown if an error occurs
-
invokeOp
public static OpResultInfo invokeOp(String name, int index, String[] args) throws JMException
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
-
-