java命名空间javax.management.remote.rmi接口rmiconnection的类成员方法:
creatembean定义及介绍
本文导语:
creatembean
objectinstance creatembean(string classname,
objectname name,
objectname loadername,
marshalledobject params,
string[] signature,
subject delegat...
creatembean
objectinstance creatembean(string classname,
objectname name,
objectname loadername,
marshalledobject params,
string[] signature,
subject delegationsubject)
throws reflectionexception,
instancealreadyexistsexception,
mbeanregistrationexception,
mbeanexception,
notcompliantmbeanexception,
instancenotfoundexception,
ioexception
- 处理
mbeanserverconnection.creatembean(string, objectname, objectname, object[], string[]) 方法。object[] 参数包装在 marshalledobject 中。
- 参数:
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 服务器中注册。
runtimeoperationsexception - 包装了 java.lang.illegalargumentexception:classname 传入的参数为 null,objectname 传入的参数包含一个模式,或未为 mbean 指定任何 objectname。
securityexception - 如果客户端或委托的 subject(如果有)没有执行此操作的权限。
ioexception - 如果出现通用通信异常。