Class AbstractJmxCommand

    • Field Detail

      • DEFAULT_JMX_URL

        public static String DEFAULT_JMX_URL
    • Constructor Detail

      • AbstractJmxCommand

        public AbstractJmxCommand()
    • Method Detail

      • getJmxServiceUrl

        protected JMXServiceURL getJmxServiceUrl()
        Get the current specified JMX service url.
        Returns:
        JMX service url
      • getJVM

        public static String getJVM()
      • isSunJVM

        public static boolean isSunJVM()
      • findJMXUrlByProcessId

        protected String findJMXUrlByProcessId​(int pid)
        Finds the JMX Url for a VM by its process id
        Parameters:
        pid - The process id value of the VM to search for.
        Returns:
        the JMX Url of the VM with the given pid or null if not found.
      • setJmxServiceUrl

        protected void setJmxServiceUrl​(JMXServiceURL jmxServiceUrl)
        Sets the JMX service url to use.
        Parameters:
        jmxServiceUrl - - new JMX service url to use
      • getJmxUser

        public String getJmxUser()
        Get the JMX user name to be used when authenticating.
        Returns:
        the JMX user name
      • setJmxUser

        public void setJmxUser​(String jmxUser)
        Sets the JMS user name to use
        Parameters:
        jmxUser - - the jmx
      • getJmxPassword

        public String getJmxPassword()
        Get the password used when authenticating
        Returns:
        the password used for JMX authentication
      • setJmxPassword

        public void setJmxPassword​(String jmxPassword)
        Sets the password to use when authenticating
        Parameters:
        jmxPassword - - the password used for JMX authentication
      • isJmxUseLocal

        public boolean isJmxUseLocal()
        Get whether the default mbean server for this JVM should be used instead of the jmx url
        Returns:
        true if the mbean server from this JVM should be used, false if the jmx url should be used
      • setJmxUseLocal

        public void setJmxUseLocal​(boolean jmxUseLocal)
        Sets whether the the default mbean server for this JVM should be used instead of the jmx url
        Parameters:
        jmxUseLocal - - true if the mbean server from this JVM should be used, false if the jmx url should be used
      • closeJmxConnection

        protected void closeJmxConnection()
        Close the current JMX connector