所有类
javax.management.remote.rmi
类 RMIConnectionImpl
java.lang.Object
javax.management.remote.rmi.RMIConnectionImpl
- 所有已实现的接口:
- Remote, Unreferenced, RMIConnection
public class RMIConnectionImpl
- extends Object
- implements RMIConnection, Unreferenced
RMIConnection
接口的实现。用户代码不经常引用此类。
- 从以下版本开始:
- 1.5
方法摘要 |
---|
void | addNotificationListener(ObjectName name, ObjectName listener, MarshalledObject filter, MarshalledObject handback, Subject delegationSubject) 处理 MBeanServerConnection.addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object) 方法。 |
Integer[] | addNotificationListeners(ObjectName[] names, MarshalledObject[] filters, Subject[] delegationSubjects) 处理 MBeanServerConnection.addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object) 方法。 |
void | close() 关闭此连接。 |
ObjectInstance | createMBean(String className, ObjectName name, MarshalledObject params, String[] signature, Subject delegationSubject) 处理 MBeanServerConnection.createMBean(String, ObjectName, Object[], String[]) 方法。 |
ObjectInstance | createMBean(String className, ObjectName name, ObjectName loaderName, MarshalledObject params, String[] signature, Subject delegationSubject) 处理 MBeanServerConnection.createMBean(String, ObjectName, ObjectName, Object[], String[]) 方法。 |
ObjectInstance | createMBean(String className, ObjectName name, ObjectName loaderName, Subject delegationSubject) 处理 MBeanServerConnection.createMBean(String, ObjectName, ObjectName) 方法。 |
ObjectInstance | createMBean(String className, ObjectName name, Subject delegationSubject) 处理 MBeanServerConnection.createMBean(String, ObjectName) 方法。 |
NotificationResult | fetchNotifications(long clientSequenceNumber, int maxNotifications, long timeout) 检索来自连接器服务器的通知。 |
Object | getAttribute(ObjectName name, String attribute, Subject delegationSubject) 处理 MBeanServerConnection.getAttribute(ObjectName, String) 方法。 |
AttributeList | getAttributes(ObjectName name, String[] attributes, Subject delegationSubject) 处理 MBeanServerConnection.getAttributes(ObjectName, String[]) 方法。 |
String | getConnectionId() 返回连接 ID。 |
String | getDefaultDomain(Subject delegationSubject) 处理 MBeanServerConnection.getDefaultDomain() 方法。 |
String[] | getDomains(Subject delegationSubject) 处理 MBeanServerConnection.getDomains() 方法。 |
Integer | getMBeanCount(Subject delegationSubject) 处理 MBeanServerConnection.getMBeanCount() 方法。 |
MBeanInfo | getMBeanInfo(ObjectName name, Subject delegationSubject) 处理 MBeanServerConnection.getMBeanInfo(ObjectName) 方法。 |
ObjectInstance | getObjectInstance(ObjectName name, Subject delegationSubject) 处理 MBeanServerConnection.getObjectInstance(ObjectName) 方法。 |
Object | invoke(ObjectName name, String operationName, MarshalledObject params, String[] signature, Subject delegationSubject) 处理 MBeanServerConnection.invoke(ObjectName, String, Object[], String[]) 方法。 |
boolean | isInstanceOf(ObjectName name, String className, Subject delegationSubject) 处理 MBeanServerConnection.isInstanceOf(ObjectName, String) 方法。 |
boolean | isRegistered(ObjectName name, Subject delegationSubject) 处理 MBeanServerConnection.isRegistered(ObjectName) 方法。 |
Set<ObjectInstance> | queryMBeans(ObjectName name, MarshalledObject query, Subject delegationSubject) 处理 MBeanServerConnection.queryMBeans(ObjectName, QueryExp) 方法。 |
Set<ObjectName> | queryNames(ObjectName name, MarshalledObject query, Subject delegationSubject) 处理 MBeanServerConnection.queryNames(ObjectName, QueryExp) 方法。 |
void | removeNotificationListener(ObjectName name, ObjectName listener, MarshalledObject filter, MarshalledObject handback, Subject delegationSubject) 处理 MBeanServerConnection.removeNotificationListener(ObjectName, ObjectName, NotificationFilter, Object) 方法。 |
void | removeNotificationListener(ObjectName name, ObjectName listener, Subject delegationSubject) 处理 MBeanServerConnection.removeNotificationListener(ObjectName, ObjectName) 方法。 |
void | removeNotificationListeners(ObjectName name, Integer[] listenerIDs, Subject delegationSubject) 处理 removeNotificationListener(ObjectName, NotificationListener) 和 removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object) 方法。 |
void | setAttribute(ObjectName name, MarshalledObject attribute, Subject delegationSubject) 处理 MBeanServerConnection.setAttribute(ObjectName, Attribute) 方法。 |
AttributeList | setAttributes(ObjectName name, MarshalledObject attributes, Subject delegationSubject) 处理 MBeanServerConnection.setAttributes(ObjectName, AttributeList) 方法。 |
String | toString() 返回此对象的字符串表示形式。 |
void | unreferenced() 在运行时确定引用列表(引用远程对象的客户机列表)变空之后的某个时候由 RMI 运行时调用。 |
void | unregisterMBean(ObjectName name, Subject delegationSubject) 处理 MBeanServerConnection.unregisterMBean(ObjectName) 方法。 |
RMIConnectionImpl
public RMIConnectionImpl(RMIServerImpl rmiServer,
String connectionId,
ClassLoader defaultClassLoader,
Subject subject,
Map<String,?> env)
- 构造新的
RMIConnection
。此连接即可与 JRMP 一起使用,也可与 IIOP 传输一起使用。此对象并不导出其自身:应由调用方将其适当地导出(请参阅 RMIJRMPServerImpl.makeClient(String,Subject)
和 RMIIIOPServerImpl.makeClient(String,Subject)
)。 - 参数:
rmiServer
- 为其创建此连接的 RMIServerImpl 对象。如果该参数为 null,则行为不明确。 connectionId
- 该连接的 ID。如果该参数为 null,则行为不明确。 defaultClassLoader
- 将在反序列化编组对象时使用的默认 ClassLoader。可以为 null,表示引导类加载器。 subject
- 将供授权使用的经验证的主题。可以为 null,表示尚未验证任何主题。 env
- 包含新的 RMIServerImpl
属性的环境。可以为 null,等效于一个空映射。
getConnectionId
public String getConnectionId()
throws IOException
- 从接口
RMIConnection
复制的描述 返回连接 ID。对于每个到给定的 RMI 连接器服务器的开放连接,此字符串都不相同。
- 指定者:
- 接口
RMIConnection
中的 getConnectionId
- 返回:
- 连接 ID
- 抛出:
IOException
- 如果出现通用通信异常。 - 另请参见:
RMIConnector.connect
close
public void close()
throws IOException
- 从接口
RMIConnection
复制的描述 关闭此连接。从此方法返回时,不导出实现此接口的 RMI 对象,因此对它的进一步远程调用将失败。
- 指定者:
- 接口
RMIConnection
中的 close
- 抛出:
IOException
- 如果无法关闭连接,或 Remote 对象无法被导出,或者在传输远程关闭请求时出现通信故障。
unreferenced
public void unreferenced()
- 从接口
Unreferenced
复制的描述 - 在运行时确定引用列表(引用远程对象的客户机列表)变空之后的某个时候由 RMI 运行时调用。
- 指定者:
- 接口
Unreferenced
中的 unreferenced
createMBean
public ObjectInstance createMBean(String className,
ObjectName name,
Subject delegationSubject)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
IOException
- 从接口
RMIConnection
复制的描述 - 处理
MBeanServerConnection.createMBean(String, ObjectName)
方法。 - 指定者:
- 接口
RMIConnection
中的 createMBean
- 参数:
className
- 要实例化的 MBean 的类名称。 name
- MBean 的对象名。可以为 null。 delegationSubject
- 包含委托 principal 的 Subject
,如果使用了验证 principal,则为 null
。 - 返回:
ObjectInstance
,它包含新实例化的 MBean 的 ObjectName
和 Java 类名。如果所包含的 ObjectName
为 n
,则所包含的 Java 类名为 getMBeanInfo(n)
.getClassName()
。 - 抛出:
ReflectionException
- 在尝试调用 MBean 的构造方法的过程中出现的、包装了 java.lang.ClassNotFoundException
或 java.lang.Exception
的异常。 InstanceAlreadyExistsException
- MBean 已处于 MBean 服务器的控制之下。 MBeanRegistrationException
- MBean 的 preRegister
(MBeanRegistration
接口)方法已抛出异常。不对 MBean 进行注册。 MBeanException
- MBean 的构造方法已抛出异常。 NotCompliantMBeanException
- 该类不是一个遵守 JMX 的 MBean。 IOException
- 如果出现通用通信异常。
createMBean
public ObjectInstance createMBean(String className,
ObjectName name,
ObjectName loaderName,
Subject delegationSubject)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
InstanceNotFoundException,
IOException
- 从接口
RMIConnection
复制的描述 - 处理
MBeanServerConnection.createMBean(String, ObjectName, ObjectName)
方法。 - 指定者:
- 接口
RMIConnection
中的 createMBean
- 参数:
className
- 要实例化的 MBean 的类名称。 name
- MBean 的对象名。可以为 null。 loaderName
- 要使用的类加载器的对象名。 delegationSubject
- 包含委托 principal 的 Subject
,如果使用了验证 principal,则为 null
。 - 返回:
ObjectInstance
,它包含新实例化的 MBean 的 ObjectName
和 Java 类名。如果所包含的 ObjectName
为 n
,则所包含的 Java 类名为 getMBeanInfo(n)
.getClassName()
。 - 抛出:
ReflectionException
- 在尝试调用 MBean 的构造方法的过程中出现的、包装了 java.lang.ClassNotFoundException
或 java.lang.Exception
的异常。 InstanceAlreadyExistsException
- MBean 已处于 MBean 服务器的控制之下。 MBeanRegistrationException
- MBean 的 preRegister
(MBeanRegistration
接口)方法已抛出异常。不对 MBean 进行注册。 MBeanException
- MBean 的构造方法已抛出异常。 NotCompliantMBeanException
- 该类不是一个遵守 JMX 的 MBean。 InstanceNotFoundException
- 指定的类加载器未在 MBean 服务器中注册。 IOException
- 如果出现通用通信异常。
createMBean
public ObjectInstance createMBean(String className,
ObjectName name,
MarshalledObject params,
String[] signature,
Subject delegationSubject)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
IOException
- 从接口
RMIConnection
复制的描述 - 处理
MBeanServerConnection.createMBean(String, ObjectName, Object[], String[])
方法。Object[]
参数包装在 MarshalledObject
中。 - 指定者:
- 接口
RMIConnection
中的 createMBean
- 参数:
className
- 要实例化的 MBean 的类名称。 name
- MBean 的对象名。可以为 null。 params
- 包含要调用的构造方法的参数的数组,数组封装在 MarshalledObject
中。封装的数组可以为 null,其等效于一个空数组。 signature
- 包含要调用的构造方法的签名的数组。可以为 null,等效于一个空数组。 delegationSubject
- 包含委托 principal 的 Subject
,如果使用了验证 principal,则为 null
。 - 返回:
ObjectInstance
,它包含新实例化的 MBean 的 ObjectName
和 Java 类名。如果所包含的 ObjectName
为 n
,则所包含的 Java 类名为 getMBeanInfo(n)
.getClassName()
。 - 抛出:
ReflectionException
- 在尝试调用 MBean 的构造方法的过程中出现的、包装了 java.lang.ClassNotFoundException
或 java.lang.Exception
的异常。 InstanceAlreadyExistsException
- MBean 已处于 MBean 服务器的控制之下。 MBeanRegistrationException
- MBean 的 preRegister
(MBeanRegistration
接口)方法已抛出异常。不对 MBean 进行注册。 MBeanException
- MBean 的构造方法已抛出异常。 NotCompliantMBeanException
- 该类不是一个遵守 JMX 的 MBean。 IOException
- 如果出现通用通信异常。
createMBean
public ObjectInstance createMBean(String className,
ObjectName name,
ObjectName loaderName,
MarshalledObject params,
String[] signature,
Subject delegationSubject)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
InstanceNotFoundException,
IOException
- 从接口
RMIConnection
复制的描述 - 处理
MBeanServerConnection.createMBean(String, ObjectName, ObjectName, Object[], String[])
方法。Object[]
参数包装在 MarshalledObject
中。 - 指定者:
- 接口
RMIConnection
中的 createMBean
- 参数:
className
- 要实例化的 MBean 的类名称。 name
- MBean 的对象名。可以为 null。 loaderName
- 要使用的类加载器的对象名。 params
- 包含要调用的构造方法的参数的数组,数组封装在 MarshalledObject
中。封装的数组可以为 null,其等效于一个空数组。 signature
- 包含要调用的构造方法的签名的数组。可以为 null,等效于一个空数组。 delegationSubject
- 包含委托 principal 的 Subject
,如果使用了验证 principal,则为 null
。 - 返回:
ObjectInstance
,它包含新实例化的 MBean 的 ObjectName
和 Java 类名。如果所包含的 ObjectName
为 n
,则所包含的 Java 类名为 getMBeanInfo(n)
.getClassName()
。 - 抛出:
ReflectionException
- 在尝试调用 MBean 的构造方法的过程中出现的、包装了 java.lang.ClassNotFoundException
或 java.lang.Exception
的异常。 InstanceAlreadyExistsException
- MBean 已处于 MBean 服务器的控制之下。 MBeanRegistrationException
- MBean 的 preRegister
(MBeanRegistration
接口)方法已抛出异常。不对 MBean 进行注册。 MBeanException
- MBean 的构造方法已抛出异常。 NotCompliantMBeanException
- 该类不是一个遵守 JMX 的 MBean。 InstanceNotFoundException
- 指定的类加载器未在 MBean 服务器中注册。 IOException
- 如果出现通用通信异常。