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, okToUseGui
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
globalHierarchyLock
PROPERTYNAME
コンストラクタと説明 |
---|
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, writeChildren
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
isDesignTime, setDesignTime
avoidingGui, dontUseGui, needsGui, okToUseGui
protected 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
、クラス: BeanContextSupport
public BeanContextServices getBeanContextServicesPeer()
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer)
サブクラスはこのメソッドをオーバーライドすることにより、セットに子を追加する add() メソッドやほかの Collection メソッドをオーバーライドすることなく、Child の独自のサブクラスを挿入することができます。
createBCSChild
、クラス: BeanContextSupport
targetChild
- 代わりに Child を作成する子peer
- targetChild とピアが BeanContextProxy によって関連付けられている場合はそのピアprotected BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp)
public void addBeanContextServicesListener(BeanContextServicesListener bcsl)
addBeanContextServicesListener
、インタフェース: BeanContextServices
bcsl
- 追加する BeanContextServicesListener
NullPointerException
public void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
removeBeanContextServicesListener
、インタフェース: BeanContextServices
bcsl
- このコンテキストから削除する BeanContextServicesListener
public boolean addService(Class serviceClass, BeanContextServiceProvider bcsp)
addService
、インタフェース: BeanContextServices
serviceClass
- 追加するサービスbcsp
- そのサービスに関連付けられている BeanContextServiceProvider
protected boolean addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
public void revokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
revokeService
、インタフェース: BeanContextServices
serviceClass
- この BeanContextServices から取り消すサービスbcsp
- この取り消される特定のサービスに関連付けられている BeanContextServiceProviderrevokeCurrentServicesNow
- true
という値は、BeanContextServiceProvider
または BeanContextServices
が、指定されたサービスへの現在未処理の参照すべてに対してサービスをただちに終了しようとしている例外状況を示します。public boolean hasService(Class serviceClass)
hasService
、インタフェース: BeanContextServices
serviceClass
- 該当するサービスpublic Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException
getService
、インタフェース: BeanContextServices
child
- このリクエストに関連付けられている BeanContextChild
requestor
- サービスをリクエストするオブジェクトserviceClass
- リクエストされたサービスのクラスserviceSelector
- サービス依存パラメータbcsrl
- そのサービスがあとで取り消しになるべき場合に通知する BeanContextServiceRevokedListener
null
TooManyListenersException
public void releaseService(BeanContextChild child, Object requestor, Object service)
releaseService
、インタフェース: BeanContextServices
child
- BeanContextChild
requestor
- リクエスタservice
- サービスpublic Iterator getCurrentServiceClasses()
BeanContextServices
getCurrentServiceClasses
、インタフェース: BeanContextServices
public Iterator getCurrentServiceSelectors(Class serviceClass)
BeanContextServices
getCurrentServiceSelectors
、インタフェース: BeanContextServices
serviceClass
- 指定されたサービスpublic void serviceAvailable(BeanContextServiceAvailableEvent bcssae)
serviceAvailable
、インタフェース: BeanContextServicesListener
serviceAvailable
、クラス: BeanContextChildSupport
bcssae
- サービスが使用可能になった結果としてトリガーされた BeanContextServiceAvailableEventpublic void serviceRevoked(BeanContextServiceRevokedEvent bcssre)
serviceRevoked
、インタフェース: BeanContextServiceRevokedListener
serviceRevoked
、クラス: BeanContextChildSupport
bcssre
- サービスの取り消しの結果としてトリガーされた BeanContextServiceRevokedEvent
protected static final BeanContextServicesListener getChildBeanContextServicesListener(Object child)
child
- 指定された子protected void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
childJustRemovedHook
、クラス: BeanContextSupport
protected void releaseBeanContextResources()
releaseBeanContextResources
、クラス: BeanContextChildSupport
protected void initializeBeanContextResources()
initializeBeanContextResources
、クラス: BeanContextChildSupport
protected final void fireServiceAdded(Class serviceClass)
protected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae)
bcssae
- BeanContextServiceAvailableEventprotected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
bcsre
- BeanContextServiceRevokedEventprotected final void fireServiceRevoked(Class serviceClass, boolean revokeNow)
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException
bcsPreSerializationHook
、クラス: BeanContextSupport
IOException
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException
bcsPreDeserializationHook
、クラス: BeanContextSupport
IOException
ClassNotFoundException
バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.