Class PlatformMBeanServerConnector
- java.lang.Object
-
- org.opennms.netmgt.jmx.impl.connection.connectors.PlatformMBeanServerConnector
-
- All Implemented Interfaces:
JmxServerConnector
public class PlatformMBeanServerConnector extends java.lang.Object implements JmxServerConnector
ThisJmxServerConnector
does not connect to a JMX server, it uses the PlatformMbeanServer of the current running JVM instead.- See Also:
ManagementFactory.getPlatformMBeanServer()
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.netmgt.jmx.connection.JmxServerConnector
JmxServerConnector.Parameters
-
-
Field Summary
-
Fields inherited from interface org.opennms.netmgt.jmx.connection.JmxServerConnector
DEFAULT_OPENNMS_JMX_PORT, JMX_PORT_SYSTEM_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description PlatformMBeanServerConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JmxServerConnectionWrapper
createConnection()
JmxServerConnectionWrapper
createConnection(java.net.InetAddress ipAddress, java.util.Map<java.lang.String,java.lang.String> propertiesMap)
Establishes a JMX connection (MBeanServerConnection
) to the givenipAddress
using required properties from the givenpropertiesMap
.
-
-
-
Method Detail
-
createConnection
public JmxServerConnectionWrapper createConnection(java.net.InetAddress ipAddress, java.util.Map<java.lang.String,java.lang.String> propertiesMap) throws JmxServerConnectionException
Description copied from interface:JmxServerConnector
Establishes a JMX connection (
The createdMBeanServerConnection
) to the givenipAddress
using required properties from the givenpropertiesMap
.MBeanServerConnection
is wrapped by theJmxServerConnectionWrapper
.- Specified by:
createConnection
in interfaceJmxServerConnector
- Parameters:
ipAddress
- The IP address to connect to.propertiesMap
- Properties to use to establish the connection (e.g. timeout, user, password, etc.)- Returns:
- The wrapped
MBeanServerConnection
. May return null, but should throw aJmxServerConnectionException
instead. - Throws:
JmxServerConnectionException
- If a JMX connection to the givenipAddress
could not be established.
-
createConnection
public JmxServerConnectionWrapper createConnection()
-
-