public class PlatformMBeanServerConnector extends Object implements JmxServerConnector
JmxServerConnector
does not connect to a JMX server,
it uses the PlatformMbeanServer of the current running JVM instead.JmxServerConnector.Parameters
DEFAULT_OPENNMS_JMX_PORT, JMX_PORT_SYSTEM_PROPERTY
Constructor and Description |
---|
PlatformMBeanServerConnector() |
Modifier and Type | Method and Description |
---|---|
JmxServerConnectionWrapper |
createConnection(InetAddress ipAddress,
Map<String,String> propertiesMap)
Establishes a JMX connection (
MBeanServerConnection ) to the given ipAddress
using required properties from the given propertiesMap . |
public JmxServerConnectionWrapper createConnection(InetAddress ipAddress, Map<String,String> propertiesMap) throws JmxServerConnectionException
JmxServerConnector
Establishes a JMX connection (MBeanServerConnection
) to the given ipAddress
using required properties from the given propertiesMap
.
MBeanServerConnection
is wrapped by the JmxServerConnectionWrapper
.createConnection
in interface JmxServerConnector
ipAddress
- The IP address to connect to.propertiesMap
- Properties to use to establish the connection (e.g. timeout, user, password, etc.)MBeanServerConnection
. May return null, but should throw a JmxServerConnectionException
instead.JmxServerConnectionException
- If a JMX connection to the given ipAddress
could not be established.Copyright © 2016. All rights reserved.