|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.protocols.jmx.OpendsJmxConnector
public class OpendsJmxConnector
Wrapper class for the JMX's RMI connector. This class has the exact same functionnalities 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 | |
---|---|
OpendsJmxConnector(java.lang.String serverHostname,
int serverPort,
java.util.Map<java.lang.String,java.lang.Object> environment)
Creates a connector client for the connector server at the given host and port. |
Method Summary | |
---|---|
void |
addConnectionNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Adds a listener to be informed of changes in connection status. |
void |
close()
Closes the client connection to its server. |
void |
connect()
Establishes the connection to the connector server. |
void |
connect(java.util.Map<java.lang.String,?> env)
Establishes the connection to the connector server. |
java.util.Map |
getConnectionEnv()
Returns the connection environment. |
java.lang.String |
getConnectionId()
Gets this connection's ID from the connector server. |
javax.management.MBeanServerConnection |
getMBeanServerConnection()
Returns an MBeanServerConnection object representing a remote MBean server. |
javax.management.MBeanServerConnection |
getMBeanServerConnection(javax.security.auth.Subject delegationSubject)
Returns an MBeanServerConnection object representing a remote MBean server on which operations are performed on behalf of the supplied delegation subject. |
void |
removeConnectionNotificationListener(javax.management.NotificationListener listener)
Removes a listener from the list to be informed of changes in status. |
void |
removeConnectionNotificationListener(javax.management.NotificationListener l,
javax.management.NotificationFilter f,
java.lang.Object handback)
Removes a listener from the list to be informed of changes in status. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OpendsJmxConnector(java.lang.String serverHostname, int serverPort, java.util.Map<java.lang.String,java.lang.Object> environment) throws java.io.IOException
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 of
environment
are not changed by this call.
java.io.IOException
- if the connector client cannot be made
because of a communication problem.Method Detail |
---|
public java.util.Map getConnectionEnv()
public void connect() throws java.io.IOException, java.lang.SecurityException
connect
in interface javax.management.remote.JMXConnector
java.io.IOException
- if the connection could not be made because of a communication
problem.
java.lang.SecurityException
- if the connection could not be made for security reasons.public void connect(java.util.Map<java.lang.String,?> env) throws java.io.IOException, java.lang.SecurityException
connect
in interface javax.management.remote.JMXConnector
env
- the properties of the connection. Properties in this map
override properties in the map specified when the JMXConnector
was created, if any. This parameter can be null, which is
equivalent to an empty map.
java.io.IOException
- if the connection could not be made because of a communication
problem.
java.lang.SecurityException
- -
if the connection could not be made for security reasons.public javax.management.MBeanServerConnection getMBeanServerConnection() throws java.io.IOException
getMBeanServerConnection
in interface javax.management.remote.JMXConnector
java.io.IOException
- -
if a valid MBeanServerConnection cannot be created, for
instance because the connection to the remote MBean server has
not yet been established (with the connect method), or it has
been closed, or it has broken.public javax.management.MBeanServerConnection getMBeanServerConnection(javax.security.auth.Subject delegationSubject) throws java.io.IOException
getMBeanServerConnection
in interface javax.management.remote.JMXConnector
delegationSubject
- the Subject on behalf of which requests will be performed. Can
be null, in which case requests will be performed on behalf of
the authenticated Subject, if any.
java.io.IOException
- if a valid MBeanServerConnection cannot be created, for
instance because the connection to the remote MBean server has
not yet been established (with the connect method), or it has
been closed, or it has broken.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface javax.management.remote.JMXConnector
java.io.IOException
- if the connection cannot be closed cleanly. If this exception
is thrown, it is not known whether the server end of the
connection has been cleanly closed.public void addConnectionNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.NullPointerException
addConnectionNotificationListener
in interface javax.management.remote.JMXConnector
listener
- a listener to receive connection status notifications.filter
- a filter to select which notifications are to be delivered to
the listener, or null if all notifications are to be delivered.handback
- an object to be given to the listener along with each
notification. Can be null.
java.lang.NullPointerException
- if listener is null.public void removeConnectionNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException, java.lang.NullPointerException
removeConnectionNotificationListener
in interface javax.management.remote.JMXConnector
listener
- -
a listener to receive connection status notifications.
java.lang.NullPointerException
- if listener is null.
javax.management.ListenerNotFoundException
- if the listener is not registered with this JMXConnector.public void removeConnectionNotificationListener(javax.management.NotificationListener l, javax.management.NotificationFilter f, java.lang.Object handback) throws javax.management.ListenerNotFoundException
removeConnectionNotificationListener
in interface javax.management.remote.JMXConnector
l
- a listener to receive connection status notifications.f
- a filter to select which notifications are to be delivered to
the listener. Can be null. handback - an object to be given to
the listener along with each notification. Can be null.handback
- an object to be given to the listener along with each
notification. Can be null.
javax.management.ListenerNotFoundException
- if the listener is not registered with this JMXConnector, or
is not registered with the given filter and handback.public java.lang.String getConnectionId() throws java.io.IOException
getConnectionId
in interface javax.management.remote.JMXConnector
java.io.IOException
- if the connection ID cannot be obtained, for instance because
the connection is closed or broken.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |