RMIConnectionpublic interface RMIConnection implements Closeable, RemoteRMI object used to forward an MBeanServer request from a client
to its MBeanServer implementation on the server side. There is one
Remote object implementing this interface for each remote client
connected to an RMI connector.
User code does not usually refer to this interface. It is
specified as part of the public API so that different
implementations of that API will interoperate.
To ensure that client parameters will be deserialized at the
server side with the correct classloader, client parameters such as
parameters used to invoke a method are wrapped in a {@link
MarshalledObject}. An implementation of this interface must first
get the appropriate class loader for the operation and its target,
then deserialize the marshalled parameters with this classloader.
Except as noted, a parameter that is a
MarshalledObject or MarshalledObject[]
must not be null; the behavior is unspecified if it is.
Class loading aspects are detailed in the
JMX Specification, version 1.4 PDF document.
Most methods in this interface parallel methods in the {@link
MBeanServerConnection} interface. Where an aspect of the behavior
of a method is not specified here, it is the same as in the
corresponding MBeanServerConnection method. |
Methods Summary |
---|
public void | addNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener, java.rmi.MarshalledObject filter, java.rmi.MarshalledObject handback, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#addNotificationListener(ObjectName,
ObjectName, NotificationFilter, Object)}. The
NotificationFilter parameter is wrapped in a
MarshalledObject . The Object
(handback) parameter is also wrapped in a
MarshalledObject .
| public java.lang.Integer[] | addNotificationListeners(javax.management.ObjectName[] names, java.rmi.MarshalledObject[] filters, javax.security.auth.Subject[] delegationSubjects)Handles the method {@link
javax.management.MBeanServerConnection#addNotificationListener(ObjectName,
NotificationListener, NotificationFilter, Object)}.
Register for notifications from the given MBeans that match
the given filters. The remote client can subsequently retrieve
the notifications using the {@link #fetchNotifications
fetchNotifications} method.
For each listener, the original
NotificationListener and handback are
kept on the client side; in order for the client to be able to
identify them, the server generates and returns a unique
listenerID . This listenerID is
forwarded with the Notifications to the remote
client.
If any one of the given (name, filter) pairs cannot be
registered, then the operation fails with an exception, and no
names or filters are registered.
| public void | close()Closes this connection. On return from this method, the RMI
object implementing this interface is unexported, so further
remote calls to it will fail.
| public javax.management.ObjectInstance | createMBean(java.lang.String className, javax.management.ObjectName name, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#createMBean(String,
ObjectName)}.
| public javax.management.ObjectInstance | createMBean(java.lang.String className, javax.management.ObjectName name, javax.management.ObjectName loaderName, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#createMBean(String,
ObjectName, ObjectName)}.
| public javax.management.ObjectInstance | createMBean(java.lang.String className, javax.management.ObjectName name, java.rmi.MarshalledObject params, java.lang.String[] signature, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#createMBean(String,
ObjectName, Object[], String[])}. The Object[]
parameter is wrapped in a MarshalledObject .
| public javax.management.ObjectInstance | createMBean(java.lang.String className, javax.management.ObjectName name, javax.management.ObjectName loaderName, java.rmi.MarshalledObject params, java.lang.String[] signature, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#createMBean(String,
ObjectName, ObjectName, Object[], String[])}. The
Object[] parameter is wrapped in a
MarshalledObject .
| public javax.management.remote.NotificationResult | fetchNotifications(long clientSequenceNumber, int maxNotifications, long timeout)Retrieves notifications from the connector server. This
method can block until there is at least one notification or
until the specified timeout is reached. The method can also
return at any time with zero notifications.
A notification can be included in the result if its sequence
number is no less than clientSequenceNumber and
this client has registered at least one listener for the MBean
generating the notification, with a filter that accepts the
notification. Each listener that is interested in the
notification is identified by an Integer ID that was returned
by {@link #addNotificationListeners(ObjectName[],
MarshalledObject[], Subject[])}.
| public java.lang.Object | getAttribute(javax.management.ObjectName name, java.lang.String attribute, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#getAttribute(ObjectName,
String)}.
| public javax.management.AttributeList | getAttributes(javax.management.ObjectName name, java.lang.String[] attributes, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#getAttributes(ObjectName,
String[])}.
| public java.lang.String | getConnectionId()Returns the connection ID. This string is different for
every open connection to a given RMI connector server.
| public java.lang.String | getDefaultDomain(javax.security.auth.Subject delegationSubject)Handles the method
{@link javax.management.MBeanServerConnection#getDefaultDomain()}.
| public java.lang.String[] | getDomains(javax.security.auth.Subject delegationSubject)Handles the method
{@link javax.management.MBeanServerConnection#getDomains()}.
| public java.lang.Integer | getMBeanCount(javax.security.auth.Subject delegationSubject)Handles the method
{@link javax.management.MBeanServerConnection#getMBeanCount()}.
| public javax.management.MBeanInfo | getMBeanInfo(javax.management.ObjectName name, javax.security.auth.Subject delegationSubject)Handles the method
{@link javax.management.MBeanServerConnection#getMBeanInfo(ObjectName)}.
| public javax.management.ObjectInstance | getObjectInstance(javax.management.ObjectName name, javax.security.auth.Subject delegationSubject)Handles the method
{@link javax.management.MBeanServerConnection#getObjectInstance(ObjectName)}.
| public java.lang.Object | invoke(javax.management.ObjectName name, java.lang.String operationName, java.rmi.MarshalledObject params, java.lang.String[] signature, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#invoke(ObjectName,
String, Object[], String[])}. The Object[]
parameter is wrapped in a MarshalledObject .
| public boolean | isInstanceOf(javax.management.ObjectName name, java.lang.String className, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#isInstanceOf(ObjectName,
String)}.
| public boolean | isRegistered(javax.management.ObjectName name, javax.security.auth.Subject delegationSubject)Handles the method
{@link javax.management.MBeanServerConnection#isRegistered(ObjectName)}.
| public java.util.Set | queryMBeans(javax.management.ObjectName name, java.rmi.MarshalledObject query, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#queryMBeans(ObjectName,
QueryExp)}. The QueryExp is wrapped in a
MarshalledObject .
| public java.util.Set | queryNames(javax.management.ObjectName name, java.rmi.MarshalledObject query, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#queryNames(ObjectName,
QueryExp)}. The QueryExp is wrapped in a
MarshalledObject .
| public void | removeNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#removeNotificationListener(ObjectName,
ObjectName)}.
| public void | removeNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listener, java.rmi.MarshalledObject filter, java.rmi.MarshalledObject handback, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#removeNotificationListener(ObjectName,
ObjectName, NotificationFilter, Object)}. The
NotificationFilter parameter is wrapped in a
MarshalledObject . The Object
parameter is also wrapped in a MarshalledObject .
| public void | removeNotificationListeners(javax.management.ObjectName name, java.lang.Integer[] listenerIDs, javax.security.auth.Subject delegationSubject)Handles the
{@link javax.management.MBeanServerConnection#removeNotificationListener(ObjectName,NotificationListener)
removeNotificationListener(ObjectName, NotificationListener)} and
{@link javax.management.MBeanServerConnection#removeNotificationListener(ObjectName,NotificationListener,NotificationFilter,Object)
removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)} methods.
This method removes one or more
NotificationListener s from a given MBean in the
MBean server.
The NotificationListeners are identified by the
IDs which were returned by the {@link
#addNotificationListeners(ObjectName[], MarshalledObject[],
Subject[])} method.
| public void | setAttribute(javax.management.ObjectName name, java.rmi.MarshalledObject attribute, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#setAttribute(ObjectName,
Attribute)}. The Attribute parameter is wrapped
in a MarshalledObject .
| public javax.management.AttributeList | setAttributes(javax.management.ObjectName name, java.rmi.MarshalledObject attributes, javax.security.auth.Subject delegationSubject)Handles the method {@link
javax.management.MBeanServerConnection#setAttributes(ObjectName,
AttributeList)}. The AttributeList parameter is
wrapped in a MarshalledObject .
| public void | unregisterMBean(javax.management.ObjectName name, javax.security.auth.Subject delegationSubject)Handles the method
{@link javax.management.MBeanServerConnection#unregisterMBean(ObjectName)}.
|
|