com.ibm.java.diagnostics.healthcenter.api

Class ConnectionProperties

  • java.lang.Object
    • com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties


  • public class ConnectionProperties
    extends java.lang.Object
    This class represents the information that is required to connect to a running application that was started with the Health Center agent attached. A successful connection requires the correct port number, host name, and authentication settings.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ConnectionProperties()
      Constructs a new ConnectionProperties object, using the default values localhost and 1972 for the host name and port number and JMX as the transport type.
      ConnectionProperties(java.lang.String hostname, int port)
      Constructs a new ConnectionProperties object, using the specified parameters for host name and port number and JMX as the transport type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getHostname()
      Gets the host name that is associated with this ConnectionProperties object.
      java.lang.String getJmxPassword()
      Gets the JMX Authentication password that is associated with this ConnectionProperties object.
      java.lang.String getJmxUsername()
      Gets the JMX authentication user name that is associated with this ConnectionProperties object.
      java.lang.String getMqttPassword()
      Gets the MQTT Authentication password that is associated with this ConnectionProperties object.
      java.lang.String getMqttUsername()
      Gets the MQTT authentication user name that is associated with this ConnectionProperties object.
      int getPort()
      Gets the port number that is associated with this ConnectionProperties object.
      java.lang.String getSSLTruststoreCertificatePassword()
      Gets the SSL truststore certificate password that is associated with this ConnectionProperties object.
      java.lang.String getSSLTruststoreLocation()
      Gets the SSL truststore location that is associated with this ConnectionProperties object.
      java.lang.String getSSLTruststorePassword()
      Gets the SSL truststore password that is associated with this ConnectionProperties object.
      boolean isJMXConnection()
      Indicates whether this object is set to use JMX as its transport type
      boolean isMQTTConnection()
      Indicates whether this object is set to use MQTT as its transport type
      boolean isUseJXMAuth()
      Indicates whether this object is set to use JMX authentication.
      boolean isUseMQTTAuth()
      Indicates whether this object is set to use MQTT authentication.
      boolean isUseSSLAuth()
      Indicates whether this object is set to use SSL authentication.
      void setHostname(java.lang.String hostname)
      Sets the host name.
      void setJMXConnection()
      Sets the connection type for this connection to be JMX.
      void setJmxPassword(java.lang.String jmxPassword)
      Sets the JMX authentication password.
      void setJmxUsername(java.lang.String jmxUsername)
      Sets the JMX authentication user name.
      void setMQTTConnection()
      Sets the connection type for this connection to be MQTT.
      void setMqttPassword(java.lang.String mqttPassword)
      Sets the MQTT authentication password.
      void setMqttUsername(java.lang.String mqttUsername)
      Sets the MQTT authentication user name.
      void setPort(int port)
      Sets the port to be used for the agent connection.
      void setSSLTruststoreCertificatePassword(java.lang.String sslTruststoreCertificatePassword)
      Sets the SSL truststore certificate password.
      void setSSLTruststoreLocation(java.lang.String sslTruststoreLocation)
      Sets the SSL truststore location to use for this connection.
      void setSSLTruststorePassword(java.lang.String sslTruststorePassword)
      Sets the SSL truststore password.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConnectionProperties

        public ConnectionProperties()
        Constructs a new ConnectionProperties object, using the default values localhost and 1972 for the host name and port number and JMX as the transport type.
      • ConnectionProperties

        public ConnectionProperties(java.lang.String hostname,
                                    int port)
        Constructs a new ConnectionProperties object, using the specified parameters for host name and port number and JMX as the transport type.
        Parameters:
        hostname - the name of the host to connect to.
        port - the port number to connect to. Setting a value of 0 will attempt a connection to an agent running in the same process as this api. This is useful for in-process monitoring where you do not require a separate process to handle the analysis. The agent needs to be started with -Xhealthcenter:level=inprocess to start the agent without a network socket running (it is not needed for in-process). This feature is available on a 2.2.1 agent and above. You can connect to earlier agents but they will still start a socket for connection (although it will be ignored)
    • Method Detail

      • getHostname

        public java.lang.String getHostname()
        Gets the host name that is associated with this ConnectionProperties object.
        Returns:
        the current host name
      • setHostname

        public void setHostname(java.lang.String hostname)
        Sets the host name.
        Parameters:
        hostname - the host name to use.
      • getPort

        public int getPort()
        Gets the port number that is associated with this ConnectionProperties object.
        Returns:
        the current port number being used.
      • setPort

        public void setPort(int port)
        Sets the port to be used for the agent connection. Setting a value of 0 will attempt a connection to an agent running in the same process as this api. This is useful for in-process monitoring where you do not require a separate process to handle the analysis. The agent needs to be started with -Xhealthcenter:level=inprocess to start the agent without a network socket running (it is not needed for in-process). This feature is available on a 2.2.1 agent and above. You can connect to earlier agents but they will still start a socket for connection (although it will be ignored)
        Parameters:
        port - the port number to use.
      • getSSLTruststoreLocation

        public java.lang.String getSSLTruststoreLocation()
        Gets the SSL truststore location that is associated with this ConnectionProperties object.
        Returns:
        the current SSL truststore location.
      • setSSLTruststoreLocation

        public void setSSLTruststoreLocation(java.lang.String sslTruststoreLocation)
        Sets the SSL truststore location to use for this connection.
        Parameters:
        sslTruststoreLocation - the SSL truststore location value to use.
      • getSSLTruststorePassword

        public java.lang.String getSSLTruststorePassword()
        Gets the SSL truststore password that is associated with this ConnectionProperties object.
        Returns:
        the current SSL truststore password.
      • setSSLTruststorePassword

        public void setSSLTruststorePassword(java.lang.String sslTruststorePassword)
        Sets the SSL truststore password.
        Parameters:
        sslTruststorePassword - the SSL truststore password value to use.
      • getSSLTruststoreCertificatePassword

        public java.lang.String getSSLTruststoreCertificatePassword()
        Gets the SSL truststore certificate password that is associated with this ConnectionProperties object.
        Returns:
        the current SSL truststore certificate password.
      • setSSLTruststoreCertificatePassword

        public void setSSLTruststoreCertificatePassword(java.lang.String sslTruststoreCertificatePassword)
        Sets the SSL truststore certificate password.
        Parameters:
        sslTruststoreCertificatePassword - the SSL truststore certificate password value to use.
      • getJmxUsername

        public java.lang.String getJmxUsername()
        Gets the JMX authentication user name that is associated with this ConnectionProperties object.
        Returns:
        the current JMX user name.
      • setJmxUsername

        public void setJmxUsername(java.lang.String jmxUsername)
        Sets the JMX authentication user name.
        Parameters:
        jmxUsername - the JMX authentication user name value to use.
      • getMqttUsername

        public java.lang.String getMqttUsername()
        Gets the MQTT authentication user name that is associated with this ConnectionProperties object.
        Returns:
        the current MQTT user name.
      • setMqttUsername

        public void setMqttUsername(java.lang.String mqttUsername)
        Sets the MQTT authentication user name.
        Parameters:
        mqttUsername - the MQTT authentication user name value to use.
      • getJmxPassword

        public java.lang.String getJmxPassword()
        Gets the JMX Authentication password that is associated with this ConnectionProperties object.
        Returns:
        the current JMX password.
      • setJmxPassword

        public void setJmxPassword(java.lang.String jmxPassword)
        Sets the JMX authentication password.
        Parameters:
        jmxPassword - the JMX authentication password value to use.
      • getMqttPassword

        public java.lang.String getMqttPassword()
        Gets the MQTT Authentication password that is associated with this ConnectionProperties object.
        Returns:
        the current MQTT password.
      • setMqttPassword

        public void setMqttPassword(java.lang.String mqttPassword)
        Sets the MQTT authentication password.
        Parameters:
        mqttPassword - the MQTT authentication password value to use.
      • isUseJXMAuth

        public boolean isUseJXMAuth()
        Indicates whether this object is set to use JMX authentication.
        Returns:
        a value indicating whether JMX authentication is set on for this ConnectionProperties object.
      • isUseMQTTAuth

        public boolean isUseMQTTAuth()
        Indicates whether this object is set to use MQTT authentication.
        Returns:
        a value indicating whether MQTT authentication is set on for this ConnectionProperties object.
      • isUseSSLAuth

        public boolean isUseSSLAuth()
        Indicates whether this object is set to use SSL authentication.
        Returns:
        a value indicating whether SSL authentication is set on this ConnectionProperties objects.
      • setMQTTConnection

        public void setMQTTConnection()
        Sets the connection type for this connection to be MQTT. The default type upon object creation is JMX. This method must be invoked when the use of MQTT transport is required.
      • setJMXConnection

        public void setJMXConnection()
        Sets the connection type for this connection to be JMX. This is the default type upon object creation.
      • isMQTTConnection

        public boolean isMQTTConnection()
        Indicates whether this object is set to use MQTT as its transport type
        Returns:
        a value indicating whether a MQTT transport type is set on for this ConnectionProperties object.
      • isJMXConnection

        public boolean isJMXConnection()
        Indicates whether this object is set to use JMX as its transport type
        Returns:
        a value indicating whether a JMX transport type is set on for this ConnectionProperties object.
� Copyright 2012, 2016 IBM Corporation.