java命名空间javax.management.remote.rmi接口rmiconnection的类成员方法:
addnotificationlistener定义及介绍
本文导语:
addnotificationlistener
void addnotificationlistener(objectname name,
objectname listener,
marshalledobject filter,
marshalledobject handback,
subject delegationsubject)
...
addnotificationlistener
void addnotificationlistener(objectname name,
objectname listener,
marshalledobject filter,
marshalledobject handback,
subject delegationsubject)
throws instancenotfoundexception,
ioexception
- 处理
mbeanserverconnection.addnotificationlistener(objectname, objectname, notificationfilter, object) 方法。notificationfilter 参数包装在 marshalledobject 中。object (handback) 参数也包装在 marshalledobject 中。
- 参数:
name - 应在其上添加侦听器的 mbean 的名称。listener - 将处理由已注册的 mbean 发出通知的侦听器的对象名。filter - 过滤器对象,封装在 marshalledobject 中。如果封装在 marshalledobject 中的过滤器的值为 null,则在对通知处理之前不执行任何过滤。handback - 通知发出时发送到侦听器的上下文,封装在 marshalledobject 中。delegationsubject - 包含委托 principal 的 subject,如果使用了验证 principal,则为 null。
- 抛出:
instancenotfoundexception - 通知侦听器或通知广播器的 mbean 名称不与注册的任何 mbean 匹配。
runtimeoperationsexception - 包装了 illegalargumentexception。存在由 listener 命名的 mbean,但它并不实现 notificationlistener 接口,或者 name 或 listener 为 null。
securityexception - 如果客户端或委托的 subject(如果有)没有执行此操作的权限。
ioexception - 如果出现通用通信异常。- 另请参见:
removenotificationlistener(objectname, objectname, subject),
removenotificationlistener(objectname, objectname, marshalledobject, marshalledobject, subject)