public class BeanContextServicesSupport extends BeanContextSupport implements BeanContextServices
このヘルパー・クラスは、java.beans.beancontext.BeanContextServicesインタフェースのユーティリティの実装を提供します。
このクラスは、BeanContextServicesインタフェースを直接実装するため、この実装をサブクラス化することによって、あるいはBeanContextProxyインタフェースを介してほかのインスタンスからこのクラスのインスタンスを委譲することによって使用することを目的としています。
| 修飾子と型 | クラス | 説明 |
|---|---|---|
protected class |
BeanContextServicesSupport.BCSSChild |
|
protected class |
BeanContextServicesSupport.BCSSProxyServiceProvider |
|
protected static class |
BeanContextServicesSupport.BCSSServiceProvider |
サブクラスは、この入れ子構造のクラスをサブクラス化して、各BeanContextServicesProviderの動作を追加できます。
|
BeanContextSupport.BCSChild, BeanContextSupport.BCSIterator| 修飾子と型 | フィールド | 説明 |
|---|---|---|
protected ArrayList |
bcsListeners |
BeanContextServicesListenerオブジェクトのリスト。
|
protected BeanContextServicesSupport.BCSSProxyServiceProvider |
proxy |
BeanContextServiceProviderの委譲。
|
protected int |
serializable |
直列化可能なBeanContextServceProviderのインスタンスの数。
|
protected HashMap |
services |
protected transient HashMap services フィールドへのすべてのアクセスはそのオブジェクトで同期されるはずです |
bcmListeners, children, designTime, locale, okToUseGuibeanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupportglobalHierarchyLockPROPERTYNAME| コンストラクタ | 説明 |
|---|---|
BeanContextServicesSupport() |
ほかのオブジェクトの委譲でないインスタンスを生成します。
|
BeanContextServicesSupport(BeanContextServices peer) |
ピアを使ってインスタンスを生成します。
|
BeanContextServicesSupport(BeanContextServices peer, Locale lcle) |
指定されたロケールを使ってインスタンスを生成します。
|
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime) |
指定されたロケールを使って設計モードでインスタンスを生成します。
|
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible) |
BeanContextServicesSupportのインスタンスを生成します。
|
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
void |
addBeanContextServicesListener(BeanContextServicesListener bcsl) |
BeanContextServicesListenerを追加します
|
boolean |
addService(Class serviceClass, BeanContextServiceProvider bcsp) |
サービスを追加します。
|
protected boolean |
addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent) |
サービスを追加します。
|
protected void |
bcsPreDeserializationHook(ObjectInputStream ois) |
BeanContextSupport readObjectが子を直列化する前に、BeanContextSupport readObjectによって呼び出されます。
|
protected void |
bcsPreSerializationHook(ObjectOutputStream oos) |
BeanContextSupport writeObjectが子を直列化する前に、BeanContextSupport writeObjectによって呼び出されます。
|
protected void |
childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc) |
子が正常に削除されたあとで、スーパー・クラスの子削除操作から呼び出されます。
|
protected BeanContextSupport.BCSChild |
createBCSChild(Object targetChild, Object peer) |
サブクラスはこのメソッドをオーバーライドすることにより、セットに子を追加するadd()メソッドやほかのCollectionメソッドをオーバーライドすることなく、Childの独自のサブクラスを挿入することができます。
|
protected BeanContextServicesSupport.BCSSServiceProvider |
createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp) |
サブクラスはこのメソッドをオーバーライドすることにより、インスタンス化するためにaddService()をオーバーライドすることなく、BCSSServiceProviderの新しいサブクラスを作成できます。
|
protected void |
fireServiceAdded(BeanContextServiceAvailableEvent bcssae) |
新しいサービスが利用可能になったことを示すBeanContextServiceAvailableEventをトリガーします。
|
protected void |
fireServiceAdded(Class serviceClass) |
新しいサービスを通知するBeanContextServiceEventをトリガーします。
|
protected void |
fireServiceRevoked(BeanContextServiceRevokedEvent bcsre) |
サービスの取消しを通知するBeanContextServiceEventをトリガーします。
|
protected void |
fireServiceRevoked(Class serviceClass, boolean revokeNow) |
特定のサービスが利用できなくなったことを示すBeanContextServiceRevokedEventをトリガーします。
|
BeanContextServices |
getBeanContextServicesPeer() |
このBeanContextServicesSupportに関連付けられているBeanContextServicesを取得します。
|
protected static BeanContextServicesListener |
getChildBeanContextServicesListener(Object child) |
指定された子のBeanContextServicesListener (存在する場合)を取得します。
|
Iterator |
getCurrentServiceClasses() |
このコンテキストに現在使用可能なサービスを取得します。
|
Iterator |
getCurrentServiceSelectors(Class serviceClass) |
基本的なBeanContextServiceProviderのgetCurrentServiceSelectors()を呼び出すことによって、指定されたサービスのサービス依存サービス・パラメータ(Service Selectors)のリストを取得します。
|
Object |
getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) |
サービスを取得します。そのサービスは委譲されることもあります。
|
boolean |
hasService(Class serviceClass) |
サービスを持ちます。そのサービスは委譲されることもあります。
|
void |
initialize() |
サブクラスの一時的な状態を初期化するために、作成時および直列化復元時にBeanContextSupportのスーパー・クラスによって呼び出されます。
|
protected void |
initializeBeanContextResources() |
入れ子になっているBeanContextから取得したリソースを割り当てるようBeanContextChildに通知するために、setBeanContextから呼び出されます。
|
protected void |
releaseBeanContextResources() |
入れ子になっているBeanContextから取得したリソースを解放するようBeanContextChildに通知するために、setBeanContextから呼び出されます。
|
void |
releaseService(BeanContextChild child, Object requestor, Object service) |
サービスを解放します。
|
void |
removeBeanContextServicesListener(BeanContextServicesListener bcsl) |
BeanContextServicesListenerを削除します
|
void |
revokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow) |
サービスを削除します。
|
void |
serviceAvailable(BeanContextServiceAvailableEvent bcssae) |
BeanContextServicesListenerのコールバックです。このBeanContextServiceがまだこのサービスを実装していない場合は、現在登録されているすべてのリスナーおよびBeanContextServicesの子にイベントを送ります。
|
void |
serviceRevoked(BeanContextServiceRevokedEvent bcssre) |
BeanContextServicesListenerのコールバックです。このBeanContextServiceがまだこのサービスを実装していない場合は、現在登録されているすべてのリスナーおよびBeanContextServicesの子にイベントを送ります。
|
add, addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, childDeserializedHook, childJustAddedHook, classEquals, clear, contains, containsAll, containsKey, copyChildren, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, instantiateChild, isDesignTime, isEmpty, isSerializing, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildrenaddPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListeneraddPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContextadd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayisDesignTime, setDesignTimeavoidingGui, dontUseGui, needsGui, okToUseGuiprotected transient HashMap services
protected transient HashMap services フィールドへのすべてのアクセスはそのオブジェクトで同期されるはずですprotected transient int serializable
protected transient BeanContextServicesSupport.BCSSProxyServiceProvider proxy
protected transient ArrayList bcsListeners
public BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
BeanContextServicesSupportのインスタンスを生成します。
peer - 実装の提供先となるピアBeanContext、このオブジェクトが自身のピアである場合はnulllcle - このBeanContextの現在のロケール。dTime - 初期状態、設計モードの場合はtrue、実行時の場合はfalse。visible - 初期状態での可視性。public BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
peer - 実装の提供先となるピアBeanContext、このオブジェクトが自身のピアである場合はnulllcle - このBeanContextの現在のロケール。dtime - 初期状態、設計モードの場合はtrue、実行時の場合はfalse。public BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
peer - 実装の提供先となるピアBeanContext、このオブジェクトが自身のピアである場合はnulllcle - このBeanContextの現在のロケール。public BeanContextServicesSupport(BeanContextServices peer)
peer - 実装の提供先となるピアBeanContext、このオブジェクトが自身のピアである場合はnullpublic BeanContextServicesSupport()
public void initialize()
initialize、クラスBeanContextSupportpublic BeanContextServices getBeanContextServicesPeer()
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer)
サブクラスはこのメソッドをオーバーライドすることにより、セットに子を追加するadd()メソッドやほかのCollectionメソッドをオーバーライドすることなく、Childの独自のサブクラスを挿入することができます。
createBCSChild、クラスBeanContextSupporttargetChild - 代わりにChildを作成する子peer - targetChildとピアがBeanContextProxyによって関連付けられている場合はそのピアprotected BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp)
sc - クラスbcsp - サービス・プロバイダpublic void addBeanContextServicesListener(BeanContextServicesListener bcsl)
addBeanContextServicesListener、インタフェースBeanContextServicesbcsl - 追加するBeanContextServicesListenerNullPointerException - 引数がnullの場合public void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
removeBeanContextServicesListener、インタフェースBeanContextServicesbcsl - このコンテキストから削除するBeanContextServicesListenerpublic boolean addService(Class serviceClass, BeanContextServiceProvider bcsp)
addService、インタフェースBeanContextServicesserviceClass - サービス・クラスbcsp - サービス・プロバイダprotected boolean addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
serviceClass - サービス・クラスbcsp - サービス・プロバイダfireEvent - イベントをトリガーするかどうかpublic void revokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
revokeService、インタフェースBeanContextServicesserviceClass - サービス・クラスbcsp - サービス・プロバイダrevokeCurrentServicesNow - サービスを取り消すかどうかpublic boolean hasService(Class serviceClass)
hasService、インタフェースBeanContextServicesserviceClass - 該当するサービスpublic Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException
getService、インタフェースBeanContextServiceschild - このリクエストに関連付けられているBeanContextChildrequestor - サービスをリクエストするオブジェクトserviceClass - リクエストされたサービスのクラスserviceSelector - サービス依存パラメータbcsrl - そのサービスがあとで取消しになるべき場合に通知するBeanContextServiceRevokedListenernullTooManyListenersException - リスナーが多すぎる場合public void releaseService(BeanContextChild child, Object requestor, Object service)
releaseService、インタフェースBeanContextServiceschild - BeanContextChildrequestor - リクエスタservice - サービスpublic Iterator getCurrentServiceClasses()
BeanContextServicesgetCurrentServiceClasses、インタフェースBeanContextServicespublic Iterator getCurrentServiceSelectors(Class serviceClass)
BeanContextServicesgetCurrentServiceSelectors、インタフェースBeanContextServicesserviceClass - 指定されたサービスpublic void serviceAvailable(BeanContextServiceAvailableEvent bcssae)
serviceAvailable、インタフェースBeanContextServicesListenerserviceAvailable、クラスBeanContextChildSupportbcssae - サービスが使用可能になった結果としてトリガーされたBeanContextServiceAvailableEventpublic void serviceRevoked(BeanContextServiceRevokedEvent bcssre)
serviceRevoked、インタフェースBeanContextServiceRevokedListenerserviceRevoked、クラスBeanContextChildSupportbcssre - サービスの取消しの結果としてトリガーされたBeanContextServiceRevokedEventprotected static final BeanContextServicesListener getChildBeanContextServicesListener(Object child)
child - 指定された子protected void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
childJustRemovedHook、クラスBeanContextSupportchild - 子bcsc - BCSChildprotected void releaseBeanContextResources()
releaseBeanContextResources、クラスBeanContextChildSupportprotected void initializeBeanContextResources()
protected final void fireServiceAdded(Class serviceClass)
serviceClass - サービス・クラスprotected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae)
bcssae - BeanContextServiceAvailableEventprotected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
bcsre - BeanContextServiceRevokedEventprotected final void fireServiceRevoked(Class serviceClass, boolean revokeNow)
serviceClass - サービス・クラスrevokeNow - イベントを今すぐ取り消すかどうかprotected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException
bcsPreSerializationHook、クラスBeanContextSupportoos - 直列化中に使用するObjectOutputStreamIOException - 直列化に失敗した場合protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException
bcsPreDeserializationHook、クラスBeanContextSupportois - 直列化復元中に使用するObjectInputStreamIOException - 直列化復元が失敗した場合ClassNotFoundException - 必要なクラスが見つからない場合 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。