Package Summary  Overview Summary

class:RMIConnectionImpl [NONE]

constructor:<init>(javax.management.remote.rmi.RMIServerImpl,java.lang.String,java.lang.ClassLoader,javax.security.auth.Subject,java.util.Map) [NONE]

  • RMIConnectionImpl

    public RMIConnectionImpl​(RMIServerImpl rmiServer,
                             String connectionId,
                             ClassLoader defaultClassLoader,
                             Subject subject,
                             Map<String,?> env)
    Constructs a new RMIConnection. This connection can be used with the JRMP transport. This object does not export itself: it is the responsibility of the caller to export it appropriately (see RMIJRMPServerImpl.makeClient(String,Subject)).
    Parameters:
    rmiServer - The RMIServerImpl object for which this connection is created. The behavior is unspecified if this parameter is null.
    connectionId - The ID for this connection. The behavior is unspecified if this parameter is null.
    defaultClassLoader - The default ClassLoader to be used when deserializing marshalled objects. Can be null, to signify the bootstrap class loader.
    subject - the authenticated subject to be used for authorization. Can be null, to signify that no subject has been authenticated.
    env - the environment containing attributes for the new RMIServerImpl. Can be null, equivalent to an empty map.

method:getConnectionId() [NONE]

method:close() [NONE]

  • close

    public void close()
               throws IOException
    
    Description copied from interface: RMIConnection

    Closes this connection. On return from this method, the RMI object implementing this interface is unexported, so further remote calls to it will fail.

    Specified by:
    close in interface AutoCloseable
    Specified by:
    close in interface Closeable
    Specified by:
    close in interface RMIConnection
    Throws:
    IOException - if the connection could not be closed, or the Remote object could not be unexported, or there was a communication failure when transmitting the remote close request.

method:unreferenced() [NONE]

  • unreferenced

    public void unreferenced()
    Description copied from interface: Unreferenced
    Called by the RMI runtime sometime after the runtime determines that the reference list, the list of clients referencing the remote object, becomes empty.
    Specified by:
    unreferenced in interface Unreferenced

method:createMBean(java.lang.String,javax.management.ObjectName,javax.security.auth.Subject) [NONE]

method:createMBean(java.lang.String,javax.management.ObjectName,javax.management.ObjectName,javax.security.auth.Subject) [NONE]

method:createMBean(java.lang.String,javax.management.ObjectName,java.rmi.MarshalledObject,java.lang.String[],javax.security.auth.Subject) [NONE]

method:createMBean(java.lang.String,javax.management.ObjectName,javax.management.ObjectName,java.rmi.MarshalledObject,java.lang.String[],javax.security.auth.Subject) [NONE]

method:unregisterMBean(javax.management.ObjectName,javax.security.auth.Subject) [NONE]

method:getObjectInstance(javax.management.ObjectName,javax.security.auth.Subject) [NONE]

method:queryMBeans(javax.management.ObjectName,java.rmi.MarshalledObject,javax.security.auth.Subject) [NONE]

  • queryMBeans

    public Set<ObjectInstance> queryMBeans​(ObjectName name,
                                           MarshalledObject query,
                                           Subject delegationSubject)
                                    throws IOException
    
    Description copied from interface: RMIConnection
    Handles the method MBeanServerConnection.queryMBeans(ObjectName, QueryExp) . The QueryExp is wrapped in a MarshalledObject.
    Specified by:
    queryMBeans in interface RMIConnection
    Parameters:
    name - 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.
    query - 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.
    delegationSubject - The Subject containing the delegation principals or null if the authentication principal is used instead.
    Returns:
    A set containing the ObjectInstance objects for the selected MBeans. If no MBean satisfies the query an empty list is returned.
    Throws:
    IOException - if a general communication exception occurred.

method:queryNames(javax.management.ObjectName,java.rmi.MarshalledObject,javax.security.auth.Subject) [NONE]

  • queryNames

    public Set<ObjectName> queryNames​(ObjectName name,
                                      MarshalledObject query,
                                      Subject delegationSubject)
                               throws IOException
    
    Description copied from interface: RMIConnection
    Handles the method MBeanServerConnection.queryNames(ObjectName, QueryExp) . The QueryExp is wrapped in a MarshalledObject.
    Specified by:
    queryNames in interface RMIConnection
    Parameters:
    name - 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.
    query - 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.
    delegationSubject - The Subject containing the delegation principals or null if the authentication principal is used instead.
    Returns:
    A set containing the ObjectNames for the MBeans selected. If no MBean satisfies the query, an empty list is returned.
    Throws:
    IOException - if a general communication exception occurred.

method:isRegistered(javax.management.ObjectName,javax.security.auth.Subject) [NONE]

  • isRegistered

    public boolean isRegistered​(ObjectName name,
                                Subject delegationSubject)
                         throws IOException
    
    Description copied from interface: RMIConnection
    Specified by:
    isRegistered in interface RMIConnection
    Parameters:
    name - The object name of the MBean to be checked.
    delegationSubject - The Subject containing the delegation principals or null if the authentication principal is used instead.
    Returns:
    True if the MBean is already registered in the MBean server, false otherwise.
    Throws:
    IOException - if a general communication exception occurred.

method:getMBeanCount(javax.security.auth.Subject) [NONE]

method:getAttribute(javax.management.ObjectName,java.lang.String,javax.security.auth.Subject) [NONE]

method:getAttributes(javax.management.ObjectName,java.lang.String[],javax.security.auth.Subject) [NONE]

method:setAttribute(javax.management.ObjectName,java.rmi.MarshalledObject,javax.security.auth.Subject) [NONE]

method:setAttributes(javax.management.ObjectName,java.rmi.MarshalledObject,javax.security.auth.Subject) [NONE]

method:invoke(javax.management.ObjectName,java.lang.String,java.rmi.MarshalledObject,java.lang.String[],javax.security.auth.Subject) [NONE]

  • invoke

    public Object invoke​(ObjectName name,
                         String operationName,
                         MarshalledObject params,
                         String[] signature,
                         Subject delegationSubject)
                  throws InstanceNotFoundException,
                         MBeanException,
                         ReflectionException,
                         IOException
    
    Description copied from interface: RMIConnection
    Handles the method MBeanServerConnection.invoke(ObjectName, String, Object[], String[]) . The Object[] parameter is wrapped in a MarshalledObject.
    Specified by:
    invoke in interface RMIConnection
    Parameters:
    name - The object name of the MBean on which the method is to be invoked.
    operationName - The name of the operation to be invoked.
    params - 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.
    signature - 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.
    delegationSubject - The Subject containing the delegation principals or null if the authentication principal is used instead.
    Returns:
    The object returned by the operation, which represents the result of invoking the operation on the MBean specified.
    Throws:
    InstanceNotFoundException - The MBean specified is not registered in the MBean server.
    MBeanException - Wraps an exception thrown by the MBean's invoked method.
    ReflectionException - Wraps a java.lang.Exception thrown while trying to invoke the method.
    IOException - if a general communication exception occurred.

method:getDefaultDomain(javax.security.auth.Subject) [NONE]

method:getDomains(javax.security.auth.Subject) [NONE]

method:getMBeanInfo(javax.management.ObjectName,javax.security.auth.Subject) [NONE]

method:isInstanceOf(javax.management.ObjectName,java.lang.String,javax.security.auth.Subject) [NONE]

method:addNotificationListeners(javax.management.ObjectName[],java.rmi.MarshalledObject[],javax.security.auth.Subject[]) [NONE]

  • addNotificationListeners

    public Integer[] addNotificationListeners​(ObjectName[] names,
                                              MarshalledObject[] filters,
                                              Subject[] delegationSubjects)
                                       throws InstanceNotFoundException,
                                              IOException
    
    Description copied from interface: RMIConnection

    Handles the method 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 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.

    Specified by:
    addNotificationListeners in interface RMIConnection
    Parameters:
    names - the ObjectNames identifying the MBeans emitting the Notifications.
    filters - an array of marshalled representations of the NotificationFilters. Elements of this array can be null.
    delegationSubjects - the Subjects on behalf of which the listeners are being added. Elements of this array can be null. Also, the delegationSubjects parameter itself can be null, which is equivalent to an array of null values with the same size as the names and filters arrays.
    Returns:
    an array of listenerIDs identifying the local listeners. This array has the same number of elements as the parameters.
    Throws:
    InstanceNotFoundException - if one of the names does not correspond to any registered MBean.
    IOException - if a general communication exception occurred.

method:addNotificationListener(javax.management.ObjectName,javax.management.ObjectName,java.rmi.MarshalledObject,java.rmi.MarshalledObject,javax.security.auth.Subject) [NONE]

method:removeNotificationListeners(javax.management.ObjectName,java.lang.Integer[],javax.security.auth.Subject) [NONE]

method:removeNotificationListener(javax.management.ObjectName,javax.management.ObjectName,javax.security.auth.Subject) [NONE]

method:removeNotificationListener(javax.management.ObjectName,javax.management.ObjectName,java.rmi.MarshalledObject,java.rmi.MarshalledObject,javax.security.auth.Subject) [NONE]

method:fetchNotifications(long,int,long) [NONE]

  • fetchNotifications

    public NotificationResult fetchNotifications​(long clientSequenceNumber,
                                                 int maxNotifications,
                                                 long timeout)
                                          throws IOException
    
    Description copied from interface: RMIConnection

    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 RMIConnection.addNotificationListeners(ObjectName[], MarshalledObject[], Subject[]) .

    Specified by:
    fetchNotifications in interface RMIConnection
    Parameters:
    clientSequenceNumber - 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.
    maxNotifications - 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.
    timeout - 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.
    Returns:
    A NotificationResult.
    Throws:
    IOException - if a general communication exception occurred.

method:toString() [NONE]

  • toString

    public String toString()

    Returns a string representation of this object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read.

    Overrides:
    toString in class Object
    Returns:
    a String representation of this object.

© 2019 Oracle Corporation and/or its affiliates