public class JmxRmiAgent extends Object
This implementation DOES NOT support port-forwarding however. The same hostname used internally
(specified in RMI_HOSTNAME_PROPERTY or autodetected by java) must also be addressable
by the JMX client. This is due to how the property is used internally by java during the
RMI registry re-direction.
If you require that the client connects to a different hostname/IP than the one where the service is bound, consider using the Brooklyn JmxmpAgent, as this will not work!
This listens on "brooklyn.jmx-agent.rmi-port" unless overridden by system property
RMI_REGISTRY_PORT_PROPERTY ("brooklyn.jmx-agent.rmi-port").
brooklyn.util.jmx.jmxmp.JmxmpAgent,
https://blogs.oracle.com/jmxetc/entry/connecting_through_firewall_using_jmx,
https://blogs.oracle.com/jmxetc/entry/more_on_premain_and_jmx| Modifier and Type | Field and Description |
|---|---|
static String |
JMX_SERVER_ADDRESS_WILDCARD_PROPERTY
Whether JMX should bind to all interfaces.
|
static String |
JMX_SERVER_DEFAULT_PORT |
static String |
JMX_SERVER_PORT_PROPERTY
Port for JMX server (sometimes called JMX_RMI server) to listen on.
|
static String |
RMI_HOSTNAME_PROPERTY
Hostname to advertise, and if "jmx.remote.server.address.wildcard" is false also the hostname/interface to bind to.
|
static String |
RMI_REGISTRY_DEFAULT_PORT |
static String |
RMI_REGISTRY_PORT_PROPERTY
Port for RMI registry to listen on.
|
| Constructor and Description |
|---|
JmxRmiAgent() |
| Modifier and Type | Method and Description |
|---|---|
static void |
agentmain(String agentArgs) |
static void |
doMain(String agentArgs) |
static void |
doMainForeground(String agentArgs) |
static void |
main(String[] args)
Convenience main method.
|
static void |
premain(String agentArgs)
The entry point, uses the JDK dynamic agent loading feature.
|
JMXConnectorServer |
startServer(Properties properties) |
public static final String RMI_REGISTRY_PORT_PROPERTY
RMI_REGISTRY_DEFAULT_PORT.public static final String RMI_REGISTRY_DEFAULT_PORT
public static final String JMX_SERVER_PORT_PROPERTY
JMX_SERVER_DEFAULT_PORT.public static final String JMX_SERVER_DEFAULT_PORT
public static final String RMI_HOSTNAME_PROPERTY
public static final String JMX_SERVER_ADDRESS_WILDCARD_PROPERTY
public static void premain(String agentArgs)
public static void agentmain(String agentArgs)
public static void doMain(String agentArgs)
public static void doMainForeground(String agentArgs)
public JMXConnectorServer startServer(Properties properties)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.