Brooklyn

brooklyn.util.jmx.jmxmp
[Java] Class JmxmpAgent

java.lang.Object
  brooklyn.util.jmx.jmxmp.JmxmpAgent

public class JmxmpAgent

This exposes JMX access over JMXMP, suitable for high-security environments, with support for going through firewalls as well as encrypting and authenticating securely.

Listens on 11099 unless overridden by system property brooklyn.jmxmp.port.

Use the usual com.sun.management.jmxremote.ssl to enable both SSL _and_ authentication (setting brooklyn.jmxmp.ssl.authenticate false if you need to disable authentication for some reason); unless you disable client-side server authentication you will need to supply brooklyn.jmxmp.ssl.keyStore, and similarly unless server-side client auth is off you'll need the corresponding trustStore (both pointing to files on the local file system).

Service comes up on: service:jmx:jmxmp://${HOSTNAME}:${PORT}

NB: To use JConsole with this endpoing, you need the jmxremote_optional JAR, and the following command (even more complicated if using SSL): java -classpath $JAVA_HOME/lib/jconsole.jar:$HOME/.m2/repository/javax/management/jmxremote_optional/1.0.1_04/jmxremote_optional-1.0.1_04.jar sun.tools.jconsole.JConsole


Field Summary
static java.lang.String AUTHENTICATE_CLIENTS_PROPERTY

whether to use SSL (TLS) certificates to authenticate the client; requires a truststore to be set, and requires USE_SSL_PROPERTY true (different to 'com.sun.management.jmxremote.authenticate' because something else insists on intercepting that and uses it for passwords); defaults to true iff USE_SSL_PROPERTY is set because who wouldn't want client authentication if you're encrypting the link

static int JMXMP_DEFAULT_PORT

static java.lang.String JMXMP_KEYSTORE_FILE_PROPERTY

static java.lang.String JMXMP_KEYSTORE_KEY_PASSWORD_PROPERTY

static java.lang.String JMXMP_KEYSTORE_PASSWORD_PROPERTY

static java.lang.String JMXMP_KEYSTORE_TYPE_PROPERTY

static java.lang.String JMXMP_PORT_PROPERTY

port to listen on; default to JMXMP_DEFAULT_PORT

static java.lang.String JMXMP_TRUSTSTORE_FILE_PROPERTY

static java.lang.String JMXMP_TRUSTSTORE_PASSWORD_PROPERTY

static java.lang.String JMXMP_TRUSTSTORE_TYPE_PROPERTY

static java.lang.String JMX_SERVER_ADDRESS_WILDCARD_PROPERTY

whether JMX should bind to all interfaces

static java.lang.String RMI_HOSTNAME_PROPERTY

hostname to advertise, and if {@value #JMX_SERVER_ADDRESS_WILDCARD_PROPERTY} is false also the hostname/interface to bind to

static java.lang.String TLS_JMX_REMOTE_PROFILES

static java.lang.String TLS_NEED_AUTHENTICATE_CLIENTS_PROPERTY

static java.lang.String TLS_SOCKET_FACTORY_PROPERTY

static java.lang.String TLS_WANT_AUTHENTICATE_CLIENTS_PROPERTY

static java.lang.String USE_SSL_PROPERTY

whether to use SSL (TLS) encryption; requires a keystore to be set

 
Method Summary
static java.lang.String getLocalhostHostname(java.util.Properties properties)

static void main(java.lang.String[] args)

static javax.net.ssl.TrustManager newInspectAllTrustManager(javax.net.ssl.X509TrustManager delegate)

static void premain(java.lang.String agentArgs)

void setSslEnvFromProperties(java.util.Map env, java.util.Properties properties)

javax.management.remote.JMXConnectorServer startJmxmpConnector(java.util.Properties properties)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

AUTHENTICATE_CLIENTS_PROPERTY

public static final java.lang.String AUTHENTICATE_CLIENTS_PROPERTY
whether to use SSL (TLS) certificates to authenticate the client; requires a truststore to be set, and requires USE_SSL_PROPERTY true (different to 'com.sun.management.jmxremote.authenticate' because something else insists on intercepting that and uses it for passwords); defaults to true iff USE_SSL_PROPERTY is set because who wouldn't want client authentication if you're encrypting the link


JMXMP_DEFAULT_PORT

public static final int JMXMP_DEFAULT_PORT


JMXMP_KEYSTORE_FILE_PROPERTY

public static final java.lang.String JMXMP_KEYSTORE_FILE_PROPERTY


JMXMP_KEYSTORE_KEY_PASSWORD_PROPERTY

public static final java.lang.String JMXMP_KEYSTORE_KEY_PASSWORD_PROPERTY


JMXMP_KEYSTORE_PASSWORD_PROPERTY

public static final java.lang.String JMXMP_KEYSTORE_PASSWORD_PROPERTY


JMXMP_KEYSTORE_TYPE_PROPERTY

public static final java.lang.String JMXMP_KEYSTORE_TYPE_PROPERTY


JMXMP_PORT_PROPERTY

public static final java.lang.String JMXMP_PORT_PROPERTY
port to listen on; default to JMXMP_DEFAULT_PORT


JMXMP_TRUSTSTORE_FILE_PROPERTY

public static final java.lang.String JMXMP_TRUSTSTORE_FILE_PROPERTY


JMXMP_TRUSTSTORE_PASSWORD_PROPERTY

public static final java.lang.String JMXMP_TRUSTSTORE_PASSWORD_PROPERTY


JMXMP_TRUSTSTORE_TYPE_PROPERTY

public static final java.lang.String JMXMP_TRUSTSTORE_TYPE_PROPERTY


JMX_SERVER_ADDRESS_WILDCARD_PROPERTY

public static final java.lang.String JMX_SERVER_ADDRESS_WILDCARD_PROPERTY
whether JMX should bind to all interfaces


RMI_HOSTNAME_PROPERTY

public static final java.lang.String RMI_HOSTNAME_PROPERTY
hostname to advertise, and if {
value:
#JMX_SERVER_ADDRESS_WILDCARD_PROPERTY} is false also the hostname/interface to bind to


TLS_JMX_REMOTE_PROFILES

public static final java.lang.String TLS_JMX_REMOTE_PROFILES


TLS_NEED_AUTHENTICATE_CLIENTS_PROPERTY

public static final java.lang.String TLS_NEED_AUTHENTICATE_CLIENTS_PROPERTY


TLS_SOCKET_FACTORY_PROPERTY

public static final java.lang.String TLS_SOCKET_FACTORY_PROPERTY


TLS_WANT_AUTHENTICATE_CLIENTS_PROPERTY

public static final java.lang.String TLS_WANT_AUTHENTICATE_CLIENTS_PROPERTY


USE_SSL_PROPERTY

public static final java.lang.String USE_SSL_PROPERTY
whether to use SSL (TLS) encryption; requires a keystore to be set


 
Method Detail

getLocalhostHostname

public static java.lang.String getLocalhostHostname(java.util.Properties properties)


main

public static void main(java.lang.String[] args)


newInspectAllTrustManager

public static final javax.net.ssl.TrustManager newInspectAllTrustManager(javax.net.ssl.X509TrustManager delegate)


premain

public static void premain(java.lang.String agentArgs)


setSslEnvFromProperties

public void setSslEnvFromProperties(java.util.Map env, java.util.Properties properties)


startJmxmpConnector

public javax.management.remote.JMXConnectorServer startJmxmpConnector(java.util.Properties properties)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.