public class RMIConnectionImpl extends Object implements RMIConnection, Unreferenced
RMIConnectionインタフェースの実装です。 通常、ユーザー・コードはこのクラスを参照しません。
| コンストラクタ | 説明 |
|---|---|
RMIConnectionImpl(RMIServerImpl rmiServer, String connectionId, ClassLoader defaultClassLoader, Subject subject, Map<String,?> env) |
新しい
RMIConnectionを構築します。 |
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の場合、空マップと同等。 public String getConnectionId() throws IOException
RMIConnection接続IDを返します。 この文字列は、指定のRMIコネクタ・サーバーへの開かれた接続ごとに異なります。
getConnectionId、インタフェースRMIConnectionIOException - 一般的な通信例外が発生した場合。RMIConnector.connectpublic void close()
throws IOException
RMIConnectionこの接続を終了します。 このメソッドの終了時には、これ以上リモート呼出しの失敗が起こらないように、このインタフェースを実装するRMIオブジェクトがアンエクスポートされます。
close、インタフェースCloseableclose、インタフェースAutoCloseableclose、インタフェースRMIConnectionIOException - 接続を終了できなかった場合、Remoteオブジェクトをアンエクスポートできなかった場合、またはリモート終了要求の転送時に通信障害が発生した場合。public void unreferenced()
Unreferencedunreferenced、インタフェースUnreferencedpublic ObjectInstance createMBean(String className, ObjectName name, Subject delegationSubject) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, IOException
RMIConnectioncreateMBean、インタフェースRMIConnectionclassName - インスタンス化するMBeanのクラス名。name - MBeanのオブジェクト名。 nullも可。 delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。ObjectNameとJavaクラス名を含むObjectInstance。 含まれる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 - 一般的な通信例外が発生した場合。public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Subject delegationSubject) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException, IOException
RMIConnectioncreateMBean、インタフェースRMIConnectionclassName - インスタンス化するMBeanのクラス名。name - MBeanのオブジェクト名。 nullも可。 loaderName - 使用するクラス・ローダーのオブジェクト名。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。ObjectNameとJavaクラス名を含むObjectInstance。 含まれる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 - 一般的な通信例外が発生した場合。public ObjectInstance createMBean(String className, ObjectName name, MarshalledObject params, String[] signature, Subject delegationSubject) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, IOException
RMIConnectionMBeanServerConnection.createMBean(String, ObjectName, Object[], String[])メソッドを処理します。 Object[]パラメータは、MarshalledObjectにラップされています。 createMBean、インタフェースRMIConnectionclassName - インスタンス化するMBeanのクラス名。name - MBeanのオブジェクト名。 nullも可。 params - 呼び出されるコンストラクタのパラメータを含む配列。この配列は、MarshalledObjectにカプセル化されている。 カプセル化された配列がnullの場合、空配列と同じ意味になる。 signature - 呼び出されるコンストラクタのシグニチャを含む配列。 nullの場合、空配列と同じ意味になる。 delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。ObjectNameとJavaクラス名を含むObjectInstance。 含まれる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 - 一般的な通信例外が発生した場合。public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, MarshalledObject params, String[] signature, Subject delegationSubject) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException, IOException
RMIConnectionMBeanServerConnection.createMBean(String, ObjectName, ObjectName, Object[], String[])メソッドを処理します。 Object[]パラメータは、MarshalledObjectにラップされています。 createMBean、インタフェースRMIConnectionclassName - インスタンス化するMBeanのクラス名。name - MBeanのオブジェクト名。 nullも可。 loaderName - 使用するクラス・ローダーのオブジェクト名。params - 呼び出されるコンストラクタのパラメータを含む配列。この配列は、MarshalledObjectにカプセル化されている。 カプセル化された配列がnullの場合、空配列と同じ意味になる。 signature - 呼び出されるコンストラクタのシグニチャを含む配列。 nullの場合、空配列と同じ意味になる。 delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。ObjectNameとJavaクラス名を含むObjectInstance。 含まれる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 - 一般的な通信例外が発生した場合。public void unregisterMBean(ObjectName name, Subject delegationSubject) throws InstanceNotFoundException, MBeanRegistrationException, IOException
RMIConnectionunregisterMBean、インタフェースRMIConnectionname - 登録解除するMBeanのオブジェクト名。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 指定されたMBeanがMBeanサーバーに登録されていない場合。MBeanRegistrationException - MBeanのpreDeregister (MBeanRegistrationインタフェース)メソッドが例外をスローした場合。IOException - 一般的な通信例外が発生した場合。public ObjectInstance getObjectInstance(ObjectName name, Subject delegationSubject) throws InstanceNotFoundException, IOException
RMIConnectiongetObjectInstance、インタフェースRMIConnectionname - MBeanのオブジェクト名。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。ObjectInstance。 含まれるObjectNameはnameで、含まれるクラス名はgetMBeanInfo(name).getClassName()。 InstanceNotFoundException - 指定されたMBeanがMBeanサーバーに登録されていない場合。IOException - 一般的な通信例外が発生した場合。public Set<ObjectInstance> queryMBeans(ObjectName name, MarshalledObject query, Subject delegationSubject) throws IOException
RMIConnectionMBeanServerConnection.queryMBeans(ObjectName, QueryExp)メソッドを処理します。 QueryExpは、MarshalledObjectにラップされています。 queryMBeans、インタフェースRMIConnectionname - 取得するMBeanを識別するオブジェクト名パターン。 nullの場合、またはドメインやキーのプロパティが指定されていない場合は、登録されているすべてのMBeanが取得される。 query - MBeanの選択に適用されるクエリー式。MarshalledObjectにカプセル化されている。 MarshalledObjectにnull値がカプセル化されている場合、MBeanの選択にクエリー式は適用されない。 delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。ObjectInstanceオブジェクトを含むセット。 クエリーの条件を満たすMBeanが存在しない場合、空のリストが返される。 IOException - 一般的な通信例外が発生した場合。public Set<ObjectName> queryNames(ObjectName name, MarshalledObject query, Subject delegationSubject) throws IOException
RMIConnectionMBeanServerConnection.queryNames(ObjectName, QueryExp)メソッドを処理します。 QueryExpは、MarshalledObjectにラップされています。 queryNames、インタフェースRMIConnectionname - 取得するMBean名を識別するオブジェクト名パターン。 nullの場合、またはドメインやキーのプロパティが指定されていない場合は、登録されているすべてのMBeanの名前が取得される。 query - MBeanの選択に適用されるクエリー式。MarshalledObjectにカプセル化されている。 MarshalledObjectにnull値がカプセル化されている場合、MBeanの選択にクエリー式は適用されない。 delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。IOException - 一般的な通信例外が発生した場合。public boolean isRegistered(ObjectName name, Subject delegationSubject) throws IOException
RMIConnectionisRegistered、インタフェースRMIConnectionname - チェック対象のMBeanのオブジェクト名。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。IOException - 一般的な通信例外が発生した場合。public Integer getMBeanCount(Subject delegationSubject) throws IOException
RMIConnectionMBeanServerConnection.getMBeanCount()メソッドを処理します。getMBeanCount、インタフェースRMIConnectiondelegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。IOException - 一般的な通信例外が発生した場合。public Object getAttribute(ObjectName name, String attribute, Subject delegationSubject) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, IOException
RMIConnectiongetAttribute、インタフェースRMIConnectionname - MBeanのオブジェクト名。このMBeanの属性が取得される。attribute - 取得される属性の名前を指定するString。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。MBeanException - MBeanのgetterによってスローされる例外をラップする場合。AttributeNotFoundException - MBeanの指定された属性がアクセス不能である場合。InstanceNotFoundException - 指定されたMBeanがMBeanサーバーに登録されていない場合。ReflectionException - 取得メソッドの呼出し時にスローされるjava.lang.Exceptionをラップする場合。IOException - 一般的な通信例外が発生した場合。RMIConnection.setAttribute(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)public AttributeList getAttributes(ObjectName name, String[] attributes, Subject delegationSubject) throws InstanceNotFoundException, ReflectionException, IOException
RMIConnectiongetAttributes、インタフェースRMIConnectionname - MBeanのオブジェクト名。このMBeanの属性が取得される。attributes - 取得される属性のリスト。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 指定されたMBeanがMBeanサーバーに登録されていない場合。ReflectionException - Dynamic MBeanのgetAttributesメソッドの呼出し時に例外が発生した場合。IOException - 一般的な通信例外が発生した場合。RMIConnection.setAttributes(javax.management.ObjectName, java.rmi.MarshalledObject, javax.security.auth.Subject)public void setAttribute(ObjectName name, MarshalledObject attribute, Subject delegationSubject) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException, IOException
RMIConnectionMBeanServerConnection.setAttribute(ObjectName, Attribute)メソッドを処理します。 Attributeパラメータは、MarshalledObjectにラップされています。 setAttribute、インタフェースRMIConnectionname - MBean名。このMBeanの属性が設定される。attribute - 設定される属性と、設定後MarshalledObjectにカプセル化される値のID。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 指定されたMBeanがMBeanサーバーに登録されていない場合。AttributeNotFoundException - MBeanの指定された属性がアクセス不能である場合。InvalidAttributeValueException - 指定された値が、属性に対する有効な値でない場合。MBeanException - MBeanのsetterによってスローされる例外をラップする場合。ReflectionException - setterの呼出し時にスローされるjava.lang.Exceptionをラップする場合。IOException - 一般的な通信例外が発生した場合。RMIConnection.getAttribute(javax.management.ObjectName, java.lang.String, javax.security.auth.Subject)public AttributeList setAttributes(ObjectName name, MarshalledObject attributes, Subject delegationSubject) throws InstanceNotFoundException, ReflectionException, IOException
RMIConnectionMBeanServerConnection.setAttributes(ObjectName, AttributeList)メソッドを処理します。 AttributeListパラメータは、MarshalledObjectにラップされています。 setAttributes、インタフェースRMIConnectionname - MBeanのオブジェクト名。このMBeanの属性が設定される。attributes - 属性のリスト。設定される属性と、設定後MarshalledObjectにカプセル化される値のID。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 指定されたMBeanがMBeanサーバーに登録されていない場合。ReflectionException - Dynamic MBeanのgetAttributesメソッドの呼出し時に例外が発生した場合。IOException - 一般的な通信例外が発生した場合。RMIConnection.getAttributes(javax.management.ObjectName, java.lang.String[], javax.security.auth.Subject)public Object invoke(ObjectName name, String operationName, MarshalledObject params, String[] signature, Subject delegationSubject) throws InstanceNotFoundException, MBeanException, ReflectionException, IOException
RMIConnectionMBeanServerConnection.invoke(ObjectName, String, Object[], String[])メソッドを処理します。 Object[]パラメータは、MarshalledObjectにラップされています。 invoke、インタフェースRMIConnectionname - メソッドの呼出しが行われるMBeanのオブジェクト名。operationName - 呼び出されるオペレーションの名前。params - オペレーションが呼び出され、MarshalledObjectにカプセル化されたとき設定されるパラメータを含む配列。 カプセル化された配列がnullの場合、空配列と同じ意味になる。 signature - オペレーションのシグニチャを含む配列。 クラス・オブジェクトのロードには、オペレーションを呼び出したMBeanをロードするときと同じクラス・ローダーが使用される。 nullの場合、空配列と同じ意味になる。 delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 指定されたMBeanがMBeanサーバーに登録されていない場合。MBeanException - MBeanの呼出しメソッドによってスローされる例外をラップする場合。ReflectionException - メソッドの呼出し時にスローされるjava.lang.Exceptionをラップする場合。IOException - 一般的な通信例外が発生した場合。public String getDefaultDomain(Subject delegationSubject) throws IOException
RMIConnectionMBeanServerConnection.getDefaultDomain()メソッドを処理します。getDefaultDomain、インタフェースRMIConnectiondelegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。IOException - 一般的な通信例外が発生した場合。public String[] getDomains(Subject delegationSubject) throws IOException
RMIConnectionMBeanServerConnection.getDomains()メソッドを処理します。getDomains、インタフェースRMIConnectiondelegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。IOException - 一般的な通信例外が発生した場合。public MBeanInfo getMBeanInfo(ObjectName name, Subject delegationSubject) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException
RMIConnectiongetMBeanInfo、インタフェースRMIConnectionname - 分析対象のMBeanの名前delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。MBeanInfoのインスタンス。このMBeanのすべての属性とオペレーションの取得を許可する。InstanceNotFoundException - 指定されたMBeanが見つからなかった場合。IntrospectionException - イントロスペクション中に例外が発生した場合。ReflectionException - Dynamic MBeanのgetMBeanInfoメソッドの呼出し時に例外が発生した場合。IOException - 一般的な通信例外が発生した場合。public boolean isInstanceOf(ObjectName name, String className, Subject delegationSubject) throws InstanceNotFoundException, IOException
RMIConnectionisInstanceOf、インタフェースRMIConnectionname - MBeanのObjectName。className - クラスの名前。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 指定されたMBeanがMBeanサーバーに登録されていない場合。IOException - 一般的な通信例外が発生した場合。public Integer[] addNotificationListeners(ObjectName[] names, MarshalledObject[] filters, Subject[] delegationSubjects) throws InstanceNotFoundException, IOException
RMIConnection指定されたフィルタに一致するMBeanからの通知を登録します。 リモート・クライアントは、その後、fetchNotificationsメソッドを使ってこれらの通知を取得できます。
クライアント側には、リスナーごとに元のNotificationListenerとhandbackが保持されます。クライアントがこれらを識別できるように、サーバーは一意のlistenerIDを生成し、返します。 このlistenerIDはNotificationsとともにリモート・クライアントに転送されます。
指定されたペア(名前、フィルタ)のいずれかを登録できない場合、オペレーションは例外を発行して終了します。この場合、名前もフィルタも登録されません。
addNotificationListeners、インタフェースRMIConnectionnames - Notificationの発行元MBeanを識別するObjectNames。filters - NotificationFiltersの整列化された表現から成る配列。 この配列の要素はnullでもよい。 delegationSubjects - Subjects。このSubject (複数可)の代わりにリスナーが追加される。 この配列の要素はnullでもよい。 また、delegationSubjectsパラメータ自体がnullであってもよい。その場合、この配列は、names配列やfilters配列と同じサイズのnull値から成る配列と同等になる。 listenerIDsから成る配列。 この配列はパラメータと同じ数の要素を持つ。 InstanceNotFoundException - namesのいずれかが登録済みMBeanに対応していない場合。IOException - 一般的な通信例外が発生した場合。public void addNotificationListener(ObjectName name, ObjectName listener, MarshalledObject filter, MarshalledObject handback, Subject delegationSubject) throws InstanceNotFoundException, IOException
RMIConnectionMBeanServerConnection.addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)メソッドを処理します。 NotificationFilterパラメータは、MarshalledObjectにラップされています。 Object (ハンドバック)パラメータも、MarshalledObjectにラップされています。 addNotificationListener、インタフェースRMIConnectionname - リスナーが追加されるMBeanの名前。listener - 登録済みMBeanが発行した通知を処理するリスナーのオブジェクト名。filter - MarshalledObjectにカプセル化されたフィルタ・オブジェクト。 MarshalledObjectにカプセル化されたフィルタがnull値を持つ場合、通知の処理前にフィルタリングは行われない。 handback - 通知が発行されたときリスナーに送信されるコンテキスト。MarshalledObjectにカプセル化されている。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 登録済みMBeanの中に、通知リスナーまたは通知ブロードキャスタのMBean名がない場合。IOException - 一般的な通信例外が発生した場合。RMIConnection.removeNotificationListener(ObjectName, ObjectName, Subject), RMIConnection.removeNotificationListener(ObjectName, ObjectName, MarshalledObject, MarshalledObject, Subject)public void removeNotificationListeners(ObjectName name, Integer[] listenerIDs, Subject delegationSubject) throws InstanceNotFoundException, ListenerNotFoundException, IOException
RMIConnectionremoveNotificationListener(ObjectName, NotificationListener)およびremoveNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)メソッドを処理します。
このメソッドは、MBeanサーバー内の指定されたMBeanから、1つ以上のNotificationListenerを削除します。
NotificationListenersは、RMIConnection.addNotificationListeners(ObjectName[], MarshalledObject[], Subject[])メソッドから返されたIDによって識別されます。
removeNotificationListeners、インタフェースRMIConnectionname - Notificationの発行元MBeanを識別するObjectName。listenerIDs - 削除するリスナーに対応するIDのリスト。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 指定されたnameが登録済みMBeanに対応していない場合。ListenerNotFoundException - サーバー側に見つからないリスナーがある場合。 この例外は、MBeanが、MBeanServer.removeNotificationListenerの呼出し以外の何らかの理由でリスナーを破棄したとき発行される。 IOException - 一般的な通信例外が発生した場合。public void removeNotificationListener(ObjectName name, ObjectName listener, Subject delegationSubject) throws InstanceNotFoundException, ListenerNotFoundException, IOException
RMIConnectionremoveNotificationListener、インタフェースRMIConnectionname - リスナーが削除されるMBeanの名前。listener - 削除されるリスナーのオブジェクト名。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 登録済みMBeanの中に、指定されたMBean名がない場合。ListenerNotFoundException - リスナーがMBeanに登録されていない場合。IOException - 一般的な通信例外が発生した場合。RMIConnection.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.rmi.MarshalledObject, javax.security.auth.Subject)public void removeNotificationListener(ObjectName name, ObjectName listener, MarshalledObject filter, MarshalledObject handback, Subject delegationSubject) throws InstanceNotFoundException, ListenerNotFoundException, IOException
RMIConnectionMBeanServerConnection.removeNotificationListener(ObjectName, ObjectName, NotificationFilter, Object)メソッドを処理します。 NotificationFilterパラメータは、MarshalledObjectにラップされています。 Objectパラメータも、MarshalledObjectにラップされています。 removeNotificationListener、インタフェースRMIConnectionname - リスナーが削除されるMBeanの名前。listener - 以前にこのMBeanに追加されたリスナー。filter - リスナーの追加時に指定されたフィルタ。MarshalledObjectにカプセル化されている。handback - リスナーの追加時に指定されたハンドバック。MarshalledObjectにカプセル化されている。delegationSubject - 委譲プリンシパルを含むSubject。認証プリンシパルが代わりに使用されている場合はnull。InstanceNotFoundException - 登録済みMBeanの中に、指定されたMBean名がない場合。ListenerNotFoundException - リスナーがMBeanに登録されていない場合、または指定されたフィルタおよびハンドバックで登録されていない場合。IOException - 一般的な通信例外が発生した場合。RMIConnection.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, java.rmi.MarshalledObject, java.rmi.MarshalledObject, javax.security.auth.Subject)public NotificationResult fetchNotifications(long clientSequenceNumber, int maxNotifications, long timeout) throws IOException
RMIConnectionコネクタ・サーバーから通知を受信します。 このメソッドは、1つ以上通知が発行されるか、指定されたタイム・アウトに達するまでブロックできます。 また、通知が0であればいつでも終了できます。
シーケンス番号がclientSequenceNumber以上で、このクライアントが通知を受け付けるフィルタを使って通知の発行元MBeanのリスナーを1つ以上登録している場合、この通知を結果に含めることができます。 この通知を待機する各リスナーは、RMIConnection.addNotificationListeners(ObjectName[], MarshalledObject[], Subject[])によって返された整数値のIDによって識別されます。
fetchNotifications、インタフェースRMIConnectionclientSequenceNumber - クライアントが待機する最初のシーケンス番号。 負の値の場合、次の通知のシーケンス番号と解釈される。 maxNotifications - 返される異なった通知の最大数。 同じ通知が繰返し発行される場合、返されるNotificationResultに含まれるTargetedNotification配列は、この値より多くの要素を持つことができる。 このパラメータの値が負の場合の動作は不定。 timeout - 通知の着信を待つ最大時間(ミリ秒単位)。 0の場合、通知がないとメソッドは待機せず、ただちに終了する。 Long.MAX_VALUEの場合、タイム・アウトは設定されない。 このパラメータの値が負の場合の動作は不定。 NotificationResult。IOException - 一般的な通信例外が発生した場合。 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。