public class ConnectionProperties
extends java.lang.Object
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.
|
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.
|
public ConnectionProperties()
localhost
and 1972
for the host name and port
number and JMX as the transport type.public ConnectionProperties(java.lang.String hostname, int port)
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)public java.lang.String getHostname()
public void setHostname(java.lang.String hostname)
hostname
- the host name to use.public int getPort()
public void setPort(int port)
port
- the port number to use.public java.lang.String getSSLTruststoreLocation()
public void setSSLTruststoreLocation(java.lang.String sslTruststoreLocation)
sslTruststoreLocation
- the SSL truststore location value to use.public java.lang.String getSSLTruststorePassword()
public void setSSLTruststorePassword(java.lang.String sslTruststorePassword)
sslTruststorePassword
- the SSL truststore password value to use.public java.lang.String getSSLTruststoreCertificatePassword()
public void setSSLTruststoreCertificatePassword(java.lang.String sslTruststoreCertificatePassword)
sslTruststoreCertificatePassword
- the SSL truststore certificate password value to use.public java.lang.String getJmxUsername()
public void setJmxUsername(java.lang.String jmxUsername)
jmxUsername
- the JMX authentication user name value to use.public java.lang.String getMqttUsername()
public void setMqttUsername(java.lang.String mqttUsername)
mqttUsername
- the MQTT authentication user name value to use.public java.lang.String getJmxPassword()
public void setJmxPassword(java.lang.String jmxPassword)
jmxPassword
- the JMX authentication password value to use.public java.lang.String getMqttPassword()
public void setMqttPassword(java.lang.String mqttPassword)
mqttPassword
- the MQTT authentication password value to use.public boolean isUseJXMAuth()
public boolean isUseMQTTAuth()
public boolean isUseSSLAuth()
public void setMQTTConnection()
public void setJMXConnection()
public boolean isMQTTConnection()
public boolean isJMXConnection()