APIdia Launch Partner
Top Description Methods
javax.management.remote.rmi

public Interface RMIConnection

extends Closeable, Remote
Known Direct Implementers
javax.management.remote.rmi.RMIConnectionImpl, javax.management.remote.rmi.RMIConnectionImpl_Stub
Annotations
@SuppressWarnings:rawtypes
Imports
java.io.Closeable, .IOException, java.rmi.MarshalledObject, .Remote, java.util.Set, javax.management.AttributeList, .AttributeNotFoundException, .InstanceAlreadyExistsException, .InstanceNotFoundException, .IntrospectionException, .InvalidAttributeValueException, .ListenerNotFoundException, .MBeanException, .MBeanInfo, .MBeanRegistrationException, .MBeanServerConnection, .NotCompliantMBeanException, .ObjectInstance, .ObjectName, .ReflectionException, .RuntimeMBeanException, .RuntimeOperationsException, javax.management.remote.NotificationResult, javax.security.auth.Subject

RMI 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 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

Most methods in this interface parallel methods in the 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.

JMX Subject Delegation has been removed. All methods that take a delegationSubject parameter will throw UnsupportedOperationException if it is non-null. This parameter is kept for interoperability with older remote clients.

Since
1.5

Method Summary

Modifier and TypeMethod and Description
public void
addNotificationListener(ObjectName
The name of the MBean on which the listener should be added.
name
,
ObjectName
The object name of the listener which will handle the notifications emitted by the registered MBean.
listener
,
MarshalledObject<T>
The filter object, encapsulated into a MarshalledObject. If filter encapsulated in the MarshalledObject has a null value, no filtering will be performed before handling notifications.
filter
,
MarshalledObject<T>
The context to be sent to the listener when a notification is emitted, encapsulated into a MarshalledObject.
handback
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object).

public Integer[]

Returns:

an array of listenerIDs identifying the local listeners. This array has the same number of elements as the parameters.
addNotificationListeners
(ObjectName[]
the ObjectNames identifying the MBeans emitting the Notifications.
names
,
MarshalledObject<T>[]
an array of marshalled representations of the NotificationFilters. Elements of this array can be null.
filters
,
Subject[]
must be null, or an array which does not contain any non-null entries.
delegationSubjects
)

Handles the method javax.management.MBeanServerConnection#addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object).

public void
close()

Redeclares java.io.Closeable.close.

Closes this connection.

public ObjectInstance

Returns:

An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n).getClassName().
createMBean
(String
The class name of the MBean to be instantiated.
className
,
ObjectName
The object name of the MBean. May be null.
name
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#createMBean(String, ObjectName).

public ObjectInstance

Returns:

An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n).getClassName().
createMBean
(String
The class name of the MBean to be instantiated.
className
,
ObjectName
The object name of the MBean. May be null.
name
,
ObjectName
The object name of the class loader to be used.
loaderName
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#createMBean(String, ObjectName, ObjectName).

public ObjectInstance

Returns:

An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n).getClassName().
createMBean
(String
The class name of the MBean to be instantiated.
className
,
ObjectName
The object name of the MBean. May be null.
name
,
MarshalledObject<T>
An array containing the parameters of the constructor to be invoked, encapsulated into a MarshalledObject. The encapsulated array can be null, equivalent to an empty array.
params
,
String[]
An array containing the signature of the constructor to be invoked. Can be null, equivalent to an empty array.
signature
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#createMBean(String, ObjectName, Object[], String[]).

public ObjectInstance

Returns:

An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n).getClassName().
createMBean
(String
The class name of the MBean to be instantiated.
className
,
ObjectName
The object name of the MBean. May be null.
name
,
ObjectName
The object name of the class loader to be used.
loaderName
,
MarshalledObject<T>
An array containing the parameters of the constructor to be invoked, encapsulated into a MarshalledObject. The encapsulated array can be null, equivalent to an empty array.
params
,
String[]
An array containing the signature of the constructor to be invoked. Can be null, equivalent to an empty array.
signature
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#createMBean(String, ObjectName, ObjectName, Object[], String[]).

public NotificationResult

Returns:

A NotificationResult.
fetchNotifications
(long
the first sequence number that the client is interested in. If negative, it is interpreted as meaning the sequence number that the next notification will have.
clientSequenceNumber
,
int
the maximum number of different notifications to return. The TargetedNotification array in the returned NotificationResult can have more elements than this if the same notification appears more than once. The behavior is unspecified if this parameter is negative.
maxNotifications
,
long
the maximum time in milliseconds to wait for a notification to arrive. This can be 0 to indicate that the method should not wait if there are no notifications, but should return at once. It can be Long.MAX_VALUE to indicate that there is no timeout. The behavior is unspecified if this parameter is negative.
timeout
)

Retrieves notifications from the connector server.

public Object

Returns:

The value of the retrieved attribute.
getAttribute
(ObjectName
The object name of the MBean from which the attribute is to be retrieved.
name
,
String
A String specifying the name of the attribute to be retrieved.
attribute
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#getAttribute(ObjectName, String).

public AttributeList

Returns:

The list of the retrieved attributes.
getAttributes
(ObjectName
The object name of the MBean from which the attributes are retrieved.
name
,
String[]
A list of the attributes to be retrieved.
attributes
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#getAttributes(ObjectName, String[]).

public String

Returns:

the connection ID
getConnectionId
()

Returns the connection ID. This string is different for every open connection to a given RMI connector server.

public String

Returns:

the default domain.
getDefaultDomain
(Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#getDefaultDomain().

public String[]

Returns:

the list of domains.
getDomains
(Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#getDomains().

public Integer

Returns:

the number of MBeans registered.
getMBeanCount
(Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#getMBeanCount().

public MBeanInfo

Returns:

An instance of MBeanInfo allowing the retrieval of all attributes and operations of this MBean.
getMBeanInfo
(ObjectName
The name of the MBean to analyze
name
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#getMBeanInfo(ObjectName).

public ObjectInstance

Returns:

The ObjectInstance associated with the MBean specified by name. The contained ObjectName is name and the contained class name is getMBeanInfo(name).getClassName().
getObjectInstance
(ObjectName
The object name of the MBean.
name
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#getObjectInstance(ObjectName).

public Object

Returns:

The object returned by the operation, which represents the result of invoking the operation on the MBean specified.
invoke
(ObjectName
The object name of the MBean on which the method is to be invoked.
name
,
String
The name of the operation to be invoked.
operationName
,
MarshalledObject<T>
An array containing the parameters to be set when the operation is invoked, encapsulated into a MarshalledObject. The encapsulated array can be null, equivalent to an empty array.
params
,
String[]
An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked. Can be null, equivalent to an empty array.
signature
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#invoke(ObjectName, String, Object[], String[]).

public boolean

Returns:

true if the MBean specified is an instance of the specified class according to the rules above, false otherwise.
isInstanceOf
(ObjectName
The ObjectName of the MBean.
name
,
String
The name of the class.
className
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#isInstanceOf(ObjectName, String).

public boolean

Returns:

True if the MBean is already registered in the MBean server, false otherwise.
isRegistered
(ObjectName
The object name of the MBean to be checked.
name
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#isRegistered(ObjectName).

public Set<ObjectInstance>

Returns:

A set containing the ObjectInstance objects for the selected MBeans. If no MBean satisfies the query an empty list is returned.
queryMBeans
(ObjectName
The object name pattern identifying the MBeans to be retrieved. If null or no domain and key properties are specified, all the MBeans registered will be retrieved.
name
,
MarshalledObject<T>
The query expression to be applied for selecting MBeans, encapsulated into a MarshalledObject. If the MarshalledObject encapsulates a null value no query expression will be applied for selecting MBeans.
query
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#queryMBeans(ObjectName, QueryExp).

public Set<ObjectName>

Returns:

A set containing the ObjectNames for the MBeans selected. If no MBean satisfies the query, an empty list is returned.
queryNames
(ObjectName
The object name pattern identifying the MBean names to be retrieved. If null or no domain and key properties are specified, the name of all registered MBeans will be retrieved.
name
,
MarshalledObject<T>
The query expression to be applied for selecting MBeans, encapsulated into a MarshalledObject. If the MarshalledObject encapsulates a null value no query expression will be applied for selecting MBeans.
query
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#queryNames(ObjectName, QueryExp).

public void
removeNotificationListener(ObjectName
The name of the MBean on which the listener should be removed.
name
,
ObjectName
The object name of the listener to be removed.
listener
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#removeNotificationListener(ObjectName, ObjectName).

public void
removeNotificationListener(ObjectName
The name of the MBean on which the listener should be removed.
name
,
ObjectName
A listener that was previously added to this MBean.
listener
,
MarshalledObject<T>
The filter that was specified when the listener was added, encapsulated into a MarshalledObject.
filter
,
MarshalledObject<T>
The handback that was specified when the listener was added, encapsulated into a MarshalledObject.
handback
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#removeNotificationListener(ObjectName, ObjectName, NotificationFilter, Object).

public void
removeNotificationListeners(ObjectName
the ObjectName identifying the MBean emitting the Notifications.
name
,
Integer[]
the list of the IDs corresponding to the listeners to remove.
listenerIDs
,
Subject
must be null.
delegationSubject
)

Handles the removeNotificationListener(ObjectName, NotificationListener) and removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object) methods.

public void
setAttribute(ObjectName
The name of the MBean within which the attribute is to be set.
name
,
MarshalledObject<T>
The identification of the attribute to be set and the value it is to be set to, encapsulated into a MarshalledObject.
attribute
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#setAttribute(ObjectName, Attribute).

public AttributeList

Returns:

The list of attributes that were set, with their new values.
setAttributes
(ObjectName
The object name of the MBean within which the attributes are to be set.
name
,
MarshalledObject<T>
A list of attributes: The identification of the attributes to be set and the values they are to be set to, encapsulated into a MarshalledObject.
attributes
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#setAttributes(ObjectName, AttributeList).

public void
unregisterMBean(ObjectName
The object name of the MBean to be unregistered.
name
,
Subject
must be null.
delegationSubject
)

Handles the method javax.management.MBeanServerConnection#unregisterMBean(ObjectName).