Class JmxRemoteComponent

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CFG_KEY_JMX_SERVICE_URL_OBJECT_NAME
      Bootstrap property key that defines the optional object name
      static java.lang.String DEFAULT_JMX_OBJECT_NAME
      The default object name "com.adaptris:type=JmxConnectorServer"
      static java.lang.String JMX_JMXMP_SASL_PASSWORD
      Bootstrap property that controls the password required for connecting to this JMXConnectorServer if the JMXServiceURL indicates the jmxmp protocol.
      static java.lang.String JMX_JMXMP_SASL_USERNAME
      Bootstrap property that controls the username required for connecting to this JMXConnectorServer if the JMXServiceURL indicates the jmxmp protocol.
      static java.lang.String JMX_SERVICE_URL_ENV_PREFIX
      Bootstrap property key prefix that controls what environment is passed through to the JMXConnectorServer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.adaptris.core.management.jmx.JmxComponentImpl.JmxComponent createJmxWrapper​(java.util.Properties config)
      Create a JMX wrapper.
      void destroy()
      Destroy the management component making it require re-initialisation.
      void init​(java.util.Properties p)
      Initialise the management component.
      boolean isStarted()  
      void start()
      Start the management component.
      void stop()
      Stop the management component.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CFG_KEY_JMX_SERVICE_URL_OBJECT_NAME

        public static final java.lang.String CFG_KEY_JMX_SERVICE_URL_OBJECT_NAME
        Bootstrap property key that defines the optional object name

        If "jmxserviceurl.objectname" is not defined then the default object name will be used, otherwise the value of the property key will be used as the objectname, so make it conforms to the standard ObjectName specification.

        See Also:
        DEFAULT_JMX_OBJECT_NAME, Constant Field Values
      • JMX_SERVICE_URL_ENV_PREFIX

        public static final java.lang.String JMX_SERVICE_URL_ENV_PREFIX
        Bootstrap property key prefix that controls what environment is passed through to the JMXConnectorServer.

        Each property that matches the prefix of "jmxserviceurl.env." is passed through to the JMXConnectorServer as part of its environment (minus the prefix); if you need specific configuration for the JMXConnectorServer then this is how you would do it. e.g. The presence of the property jmxserviceurl.env.myEnvironment=ABCDE would cause an environment containing myEnvironment=ABCDE to be passed through to JMXConnectorServerFactory.newJMXConnectorServer(JMXServiceURL, Map, MBeanServer). Obviously due to the inherent restrictions on properties, the environment will be the equivalent to a Map<String, String>

        See Also:
        JMXConnectorServerFactory.newJMXConnectorServer(JMXServiceURL, Map, MBeanServer), Constant Field Values
      • JMX_JMXMP_SASL_USERNAME

        public static final java.lang.String JMX_JMXMP_SASL_USERNAME
        Bootstrap property that controls the username required for connecting to this JMXConnectorServer if the JMXServiceURL indicates the jmxmp protocol.

        If no jmx.remote.profiles setting is specified then SASL/PLAIN is used. Different profiles may be specified according to the Oracle JDMK tutorial. Specifying a profile of TLS may require additional javax.net.ssl.* system properties.

        See Also:
        Constant Field Values
      • JMX_JMXMP_SASL_PASSWORD

        public static final java.lang.String JMX_JMXMP_SASL_PASSWORD
        Bootstrap property that controls the password required for connecting to this JMXConnectorServer if the JMXServiceURL indicates the jmxmp protocol.

        If no jmx.remote.profiles setting is specified then SASL/PLAIN is used. Different profiles may be specified according to the Oracle JDMK tutorial. Specifying a profile of TLS may require additional javax.net.ssl.* system properties.

        See Also:
        Constant Field Values
      • DEFAULT_JMX_OBJECT_NAME

        public static final java.lang.String DEFAULT_JMX_OBJECT_NAME
        The default object name "com.adaptris:type=JmxConnectorServer"
        See Also:
        Constant Field Values
    • Constructor Detail

      • JmxRemoteComponent

        public JmxRemoteComponent()
    • Method Detail

      • createJmxWrapper

        protected com.adaptris.core.management.jmx.JmxComponentImpl.JmxComponent createJmxWrapper​(java.util.Properties config)
                                                                                           throws java.lang.Exception
        Create a JMX wrapper.
        Parameters:
        config - the properties
        Returns:
        null or something that can start/stop/register itself.
        Throws:
        java.lang.Exception
      • init

        public final void init​(java.util.Properties p)
                        throws java.lang.Exception
        Description copied from interface: ManagementComponent
        Initialise the management component.
        Parameters:
        p - configuration properties that have been built during bootstrap.
        Throws:
        java.lang.Exception - if initialisation fails.
      • start

        public final void start()
                         throws java.lang.Exception
        Description copied from interface: ManagementComponent
        Start the management component.
        Throws:
        java.lang.Exception
      • stop

        public final void stop()
                        throws java.lang.Exception
        Description copied from interface: ManagementComponent
        Stop the management component.
        Throws:
        java.lang.Exception
      • destroy

        public final void destroy()
                           throws java.lang.Exception
        Description copied from interface: ManagementComponent
        Destroy the management component making it require re-initialisation.
        Throws:
        java.lang.Exception
      • isStarted

        public boolean isStarted()