Package org.opends.server.protocols.jmx
Class OpendsJmxConnector
- java.lang.Object
-
- org.opends.server.protocols.jmx.OpendsJmxConnector
-
- All Implemented Interfaces:
Closeable,AutoCloseable,JMXConnector
public class OpendsJmxConnector extends Object implements JMXConnector
Wrapper class for the JMX's RMI connector. This class has the exact same functionalities but maintain inner variables which are used during the connection phase.Note that the javadoc has been copied from the javax.management.remote.JMXConnector interface.
-
-
Field Summary
-
Fields inherited from interface javax.management.remote.JMXConnector
CREDENTIALS
-
-
Constructor Summary
Constructors Constructor Description OpendsJmxConnector(String serverHostname, int serverPort, Map<String,Object> environment)Creates a connector client for the connector server at the given host and port.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConnectionNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)voidclose()voidconnect()voidconnect(Map<String,?> env)Map<String,Object>getConnectionEnv()Returns the connection environment.StringgetConnectionId()MBeanServerConnectiongetMBeanServerConnection()MBeanServerConnectiongetMBeanServerConnection(Subject delegationSubject)voidremoveConnectionNotificationListener(NotificationListener listener)voidremoveConnectionNotificationListener(NotificationListener l, NotificationFilter f, Object handback)
-
-
-
Constructor Detail
-
OpendsJmxConnector
public OpendsJmxConnector(String serverHostname, int serverPort, Map<String,Object> environment) throws IOException
Creates a connector client for the connector server at the given host and port. The resultant client is not connected until its connect method is called.- Parameters:
serverHostname- the target server hostnameserverPort- the target server portenvironment- a set of attributes to determine how the connection is made. This parameter can be null. Keys in this map must be Strings. The appropriate type of each associated value depends on the attribute. The contents ofenvironmentare not changed by this call.- Throws:
IOException- if the connector client cannot be made because of a communication problem.
-
-
Method Detail
-
getConnectionEnv
public Map<String,Object> getConnectionEnv()
Returns the connection environment.- Returns:
- Map the connection environment used by new connections
-
connect
public void connect() throws IOException- Specified by:
connectin interfaceJMXConnector- Throws:
IOException
-
connect
public void connect(Map<String,?> env) throws IOException
- Specified by:
connectin interfaceJMXConnector- Throws:
IOException
-
getMBeanServerConnection
public MBeanServerConnection getMBeanServerConnection() throws IOException
- Specified by:
getMBeanServerConnectionin interfaceJMXConnector- Throws:
IOException
-
getMBeanServerConnection
public MBeanServerConnection getMBeanServerConnection(Subject delegationSubject) throws IOException
- Specified by:
getMBeanServerConnectionin interfaceJMXConnector- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceJMXConnector- Throws:
IOException
-
addConnectionNotificationListener
public void addConnectionNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
- Specified by:
addConnectionNotificationListenerin interfaceJMXConnector
-
removeConnectionNotificationListener
public void removeConnectionNotificationListener(NotificationListener listener) throws ListenerNotFoundException
- Specified by:
removeConnectionNotificationListenerin interfaceJMXConnector- Throws:
ListenerNotFoundException
-
removeConnectionNotificationListener
public void removeConnectionNotificationListener(NotificationListener l, NotificationFilter f, Object handback) throws ListenerNotFoundException
- Specified by:
removeConnectionNotificationListenerin interfaceJMXConnector- Throws:
ListenerNotFoundException
-
getConnectionId
public String getConnectionId() throws IOException
- Specified by:
getConnectionIdin interfaceJMXConnector- Throws:
IOException
-
-