インタフェースBeanContextServices
- すべてのスーパー・インタフェース:
BeanContext,BeanContextChild,BeanContextServiceRevokedListener,BeanContextServicesListener,Collection,DesignMode,EventListener,Iterable,Visibility
- 既知のすべての実装クラス:
BeanContextServicesSupport
@Deprecated(since="23", forRemoval=true) public interface BeanContextServices extends BeanContext, BeanContextServicesListener
削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。
BeanContextServicesインタフェースは、BeanContextChildオブジェクトがジェネリック・サービスを受けられるようにするためのメカニズムをBeanContextに提供します。
-
フィールドのサマリー
インタフェースjava.beans.beancontext.BeanContextで宣言されているフィールド
globalHierarchyLockインタフェースjava.beans.DesignModeで宣言されているフィールド
PROPERTYNAME -
メソッドのサマリー
修飾子と型メソッド説明void削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。このBeanContextにBeanContextServicesListenerを追加しますbooleanaddService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。このBeanContextにサービスを追加します。Iterator<?> 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。このコンテキストに現在使用可能なサービスを取得します。Iterator<?> getCurrentServiceSelectors(Class<?> serviceClass) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。基本的なBeanContextServiceProviderのgetCurrentServiceSelectors()を呼び出すことによって、指定されたサービスのサービス依存サービス・パラメータ(Service Selectors)のリストを取得します。getService(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。BeanContextChild、またはBeanContextChildに関連した任意のオブジェクトは、このメソッドを呼び出すことによって、入れ子になっているBeanContextServicesから現在登録されているサービスへの参照を取得できます。booleanhasService(Class<?> serviceClass) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。指定されたサービスが現在、このコンテキストから使用可能かどうかを報告します。voidreleaseService(BeanContextChild child, Object requestor, Object service) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。ベースとなるBeanContextServiceProviderに対してreleaseService()を呼び出すことにより、BeanContextChild(またはBeanContextChildに関連した任意のオブジェクト)の、指定されたサービスへの参照を解放します。void削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。このBeanContextからBeanContextServicesListenerを削除しますvoidrevokeService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。現在登録されているサービスをこのコンテキストから削除するために、BeanContextServiceProvidersは、このメソッドを呼び出して削除できます。インタフェースjava.beans.beancontext.BeanContextで宣言されたメソッド
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListenerインタフェースjava.beans.beancontext.BeanContextChildで宣言されたメソッド
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContextインタフェースjava.beans.beancontext.BeanContextServiceRevokedListenerで宣言されたメソッド
serviceRevokedインタフェースjava.beans.beancontext.BeanContextServicesListenerで宣言されたメソッド
serviceAvailableインタフェースjava.util.Collectionで宣言されたメソッド
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArrayインタフェースjava.beans.DesignModeで宣言されたメソッド
isDesignTime, setDesignTimeインタフェースjava.beans.Visibilityで宣言されたメソッド
avoidingGui, dontUseGui, needsGui, okToUseGui
-
メソッドの詳細
-
addService
boolean addService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。このBeanContextにサービスを追加します。BeanContextServiceProviderは、このメソッドを呼び出して、このコンテキストに特定のサービスを登録します。 そのサービスが以前に追加されていない場合、BeanContextServicesはこのサービスをBeanContextServiceProviderと関連付け、現在登録されているすべてのBeanContextServicesListenersにBeanContextServiceAvailableEventをトリガーします。 続いてメソッドはtrueを返し、サービスの追加が完了したことを示します。 指定されたサービスがすでに追加されている場合、このメソッドは単にfalseを返します。- パラメータ:
serviceClass- 追加するサービスserviceProvider- そのサービスに関連付けられているBeanContextServiceProvider- 戻り値:
- サービスの追加が成功した場合はtrue、そうでない場合はfalse
-
revokeService
void revokeService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。現在登録されているサービスをこのコンテキストから削除するために、BeanContextServiceProvidersは、このメソッドを呼び出して削除できます。 サービスの呼出しの際、BeanContextServicesは、現在登録されているBeanContextServiceRevokedListenersおよびBeanContextServicesListenersのリストに、BeanContextServiceRevokedEventをトリガーします。- パラメータ:
serviceClass- このBeanContextServicesから取り消すサービスserviceProvider- この取り消される特定のサービスに関連付けられているBeanContextServiceProviderrevokeCurrentServicesNow-trueという値は、BeanContextServiceProviderまたはBeanContextServicesが、指定されたサービスへの現在未処理の参照すべてに対してサービスをただちに終了しようとしている例外状況を示します。
-
hasService
boolean hasService(Class<?> serviceClass) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。指定されたサービスが現在、このコンテキストから使用可能かどうかを報告します。- パラメータ:
serviceClass- 該当するサービス- 戻り値:
- サービスが使用可能な場合はtrue
-
getService
Object getService(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。BeanContextChild、またはBeanContextChildに関連した任意のオブジェクトは、このメソッドを呼び出すことによって、入れ子になっているBeanContextServicesから現在登録されているサービスへの参照を取得できます。 呼び出されると、このメソッドは、基本的なBeanContextServiceProviderのgetService()メソッドを呼び出すことによってサービスを取得します。- パラメータ:
child- このリクエストに関連付けられているBeanContextChildrequestor- サービスをリクエストするオブジェクトserviceClass- リクエストされたサービスのクラスserviceSelector- サービス依存パラメータbcsrl- そのサービスがあとで取消しになるべき場合に通知するBeanContextServiceRevokedListener- 戻り値:
- リクエストされた、このコンテキストの指定されたサービスへの参照、または
null - スロー:
TooManyListenersException- リスナーが多すぎる場合
-
releaseService
void releaseService(BeanContextChild child, Object requestor, Object service) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。ベースとなるBeanContextServiceProviderに対してreleaseService()を呼び出すことにより、BeanContextChild(またはBeanContextChildに関連した任意のオブジェクト)の、指定されたサービスへの参照を解放します。- パラメータ:
child-BeanContextChildrequestor- リクエスタservice- サービス
-
getCurrentServiceClasses
Iterator<?> getCurrentServiceClasses()削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。このコンテキストに現在使用可能なサービスを取得します。- 戻り値:
- 現在使用可能なサービスで構成される
Iterator
-
getCurrentServiceSelectors
削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。基本的なBeanContextServiceProviderのgetCurrentServiceSelectors()を呼び出すことによって、指定されたサービスのサービス依存サービス・パラメータ(Service Selectors)のリストを取得します。- パラメータ:
serviceClass- 指定されたサービス- 戻り値:
- 指定されたserviceClassで現在使用可能なサービス・セレクタ
-
addBeanContextServicesListener
void addBeanContextServicesListener(BeanContextServicesListener bcsl) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。このBeanContextにBeanContextServicesListenerを追加します- パラメータ:
bcsl- 追加するBeanContextServicesListener
-
removeBeanContextServicesListener
void removeBeanContextServicesListener(BeanContextServicesListener bcsl) 削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。このBeanContextからBeanContextServicesListenerを削除します- パラメータ:
bcsl- このコンテキストから削除するBeanContextServicesListener
-