- 
- すべてのスーパー・インタフェース:
- BeanContext,- BeanContextChild,- BeanContextServiceRevokedListener,- BeanContextServicesListener,- Collection,- DesignMode,- EventListener,- Iterable,- Visibility
 - 既知のすべての実装クラス:
- BeanContextServicesSupport
 
 public interface BeanContextServices extends BeanContext, BeanContextServicesListener BeanContextServicesインタフェースは、BeanContextChildオブジェクトがジェネリック・サービスを受けられるようにするためのメカニズムをBeanContextに提供します。 
- 
- 
フィールドのサマリー- 
インタフェース java.beans.beancontext.BeanContextで宣言されたフィールドglobalHierarchyLock
 - 
インタフェース java.beans.DesignModeで宣言されたフィールドPROPERTYNAME
 
- 
 - 
メソッドのサマリー修飾子と型 メソッド 説明 voidaddBeanContextServicesListener(BeanContextServicesListener bcsl)このBeanContextにBeanContextServicesListenerを追加しますbooleanaddService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider)このBeanContextにサービスを追加します。Iterator<?>getCurrentServiceClasses()このコンテキストに現在使用可能なサービスを取得します。Iterator<?>getCurrentServiceSelectors(クラス<?> serviceClass)基本的なBeanContextServiceProviderのgetCurrentServiceSelectors()を呼び出すことによって、指定されたサービスのサービス依存サービス・パラメータ(Service Selectors)のリストを取得します。ObjectgetService(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)BeanContextChild、またはBeanContextChildに関連した任意のオブジェクトは、このメソッドを呼び出すことによって、入れ子になっているBeanContextServicesから現在登録されているサービスへの参照を取得できます。booleanhasService(クラス<?> serviceClass)指定されたサービスが現在、このコンテキストから使用可能かどうかを報告します。voidreleaseService(BeanContextChild child, Object requestor, Object service)ベースとなるBeanContextServiceProviderに対してreleaseService()を呼び出すことにより、BeanContextChild(またはBeanContextChildに関連した任意のオブジェクト)の、指定されたサービスへの参照を解放します。voidremoveBeanContextServicesListener(BeanContextServicesListener bcsl)このBeanContextからBeanContextServicesListenerを削除しますvoidrevokeService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)現在登録されているサービスをこのコンテキストから削除するために、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
 
- 
 
- 
- 
- 
メソッドの詳細- 
addServiceboolean addService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider) このBeanContextにサービスを追加します。BeanContextServiceProviderは、このメソッドを呼び出して、このコンテキストに特定のサービスを登録します。 そのサービスが以前に追加されていない場合、BeanContextServicesはこのサービスをBeanContextServiceProviderと関連付け、現在登録されているすべてのBeanContextServicesListenersにBeanContextServiceAvailableEventをトリガーします。 続いてメソッドはtrueを返し、サービスの追加が完了したことを示します。 指定されたサービスがすでに追加されている場合、このメソッドは単にfalseを返します。- パラメータ:
- serviceClass- 追加するサービス
- serviceProvider- そのサービスに関連付けられている- BeanContextServiceProvider
- 戻り値:
- サービスの追加が成功した場合はtrue、そうでない場合はfalse
 
 - 
revokeServicevoid revokeService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow) 現在登録されているサービスをこのコンテキストから削除するために、BeanContextServiceProvidersは、このメソッドを呼び出して削除できます。 サービスの呼出しの際、BeanContextServicesは、現在登録されているBeanContextServiceRevokedListenersおよびBeanContextServicesListenersのリストに、BeanContextServiceRevokedEventをトリガーします。- パラメータ:
- serviceClass- このBeanContextServicesから取り消すサービス
- serviceProvider- この取り消される特定のサービスに関連付けられているBeanContextServiceProvider
- revokeCurrentServicesNow-- trueという値は、- BeanContextServiceProviderまたは- BeanContextServicesが、指定されたサービスへの現在未処理の参照すべてに対してサービスをただちに終了しようとしている例外状況を示します。
 
 - 
hasServiceboolean hasService(Class<?> serviceClass) 指定されたサービスが現在、このコンテキストから使用可能かどうかを報告します。- パラメータ:
- serviceClass- 該当するサービス
- 戻り値:
- サービスが使用可能な場合はtrue
 
 - 
getServiceObject getService(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException BeanContextChild、またはBeanContextChildに関連した任意のオブジェクトは、このメソッドを呼び出すことによって、入れ子になっているBeanContextServicesから現在登録されているサービスへの参照を取得できます。 呼び出されると、このメソッドは、基本的なBeanContextServiceProviderのgetService()メソッドを呼び出すことによってサービスを取得します。- パラメータ:
- child- このリクエストに関連付けられている- BeanContextChild
- requestor- サービスをリクエストするオブジェクト
- serviceClass- リクエストされたサービスのクラス
- serviceSelector- サービス依存パラメータ
- bcsrl- そのサービスがあとで取消しになるべき場合に通知する- BeanContextServiceRevokedListener
- 戻り値:
- リクエストされた、このコンテキストの指定されたサービスへの参照、またはnull
- 例外:
- TooManyListenersException- リスナーが多すぎる場合
 
 - 
releaseServicevoid releaseService(BeanContextChild child, Object requestor, Object service) ベースとなるBeanContextServiceProviderに対してreleaseService()を呼び出すことにより、BeanContextChild(またはBeanContextChildに関連した任意のオブジェクト)の、指定されたサービスへの参照を解放します。- パラメータ:
- child-- BeanContextChild
- requestor- リクエスタ
- service- サービス
 
 - 
getCurrentServiceClassesIterator<?> getCurrentServiceClasses() このコンテキストに現在使用可能なサービスを取得します。- 戻り値:
- 現在使用可能なサービスで構成されるIterator
 
 - 
getCurrentServiceSelectorsIterator<?> getCurrentServiceSelectors(Class<?> serviceClass) 基本的なBeanContextServiceProviderのgetCurrentServiceSelectors()を呼び出すことによって、指定されたサービスのサービス依存サービス・パラメータ(Service Selectors)のリストを取得します。- パラメータ:
- serviceClass- 指定されたサービス
- 戻り値:
- 指定されたserviceClassで現在使用可能なサービス・セレクタ
 
 - 
addBeanContextServicesListenervoid addBeanContextServicesListener(BeanContextServicesListener bcsl) このBeanContextにBeanContextServicesListenerを追加します- パラメータ:
- bcsl- 追加する- BeanContextServicesListener
 
 - 
removeBeanContextServicesListenervoid removeBeanContextServicesListener(BeanContextServicesListener bcsl) このBeanContextからBeanContextServicesListenerを削除します- パラメータ:
- bcsl- このコンテキストから削除する- BeanContextServicesListener
 
 
- 
 
-