Class Server

    • Constructor Detail

      • Server

        public Server()
    • 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 name
        attrName - 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 name
        attrName - 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 name
        attrInfo - 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 name
        attributes - 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 name
        index - The method index
        args - 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 name
        opName - The operation name
        argTypes - The argument types
        args - The arguments
        Returns:
        The result
        Throws:
        JMException - Thrown if an error occurs