Java プラットフォーム 1.2

java.beans.beancontext
クラス BeanContextServicesSupport

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextChildSupport
        |
        +--java.beans.beancontext.BeanContextSupport
              |
              +--java.beans.beancontext.BeanContextServicesSupport

public class BeanContextServicesSupport
extends BeanContextSupport
implements BeanContextServices

このヘルパークラスは、java.beans.beancontext.BeanContextServices インタフェースのユーティリティの実装を提供します。

このクラスは、BeanContextServices インタフェースを直接実装するため、この実装をサブクラス化することによって、あるいは BeanContextProxy インタフェースを介してほかのインスタンスからこのクラスのインスタンスを委譲することによって使用することを意図しています。

導入されたバージョン:
JDK1.2
関連項目:
直列化された形式

内部クラスの概要
protected  class BeanContextServicesSupport.BCSSChild
           
protected  class BeanContextServicesSupport.BCSSProxyServiceProvider
           
protected static class BeanContextServicesSupport.BCSSServiceProvider
          サブクラスは、各 BeanContextServicesProvider に動作を追加するために、この入れ子にされたクラスをサブクラス化することができます。
 
クラス java.beans.beancontext.BeanContextSupport から継承した内部クラス
BeanContextSupport.BCSChild, BeanContextSupport.BCSIterator
 
フィールドの概要
protected  ArrayList bcsListeners
           
protected  BeanContextServicesSupport.BCSSProxyServiceProvider proxy
           
protected  int serializable
           
protected  HashMap services
          protected transient HashMap services フィールドへのすべてのアクセスは、そのオブジェクトについて同期がとられます。
 
クラス java.beans.beancontext.BeanContextSupport から継承したフィールド
bcmListeners, children, designTime, locale, okToUseGui
 
クラス java.beans.beancontext.BeanContextChildSupport から継承したフィールド
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
コンストラクタの概要
BeanContextServicesSupport()
          ほかのオブジェクトの委譲でないインスタンスを生成します。
BeanContextServicesSupport(BeanContextServices peer)
          ピアを使ってインスタンスを生成します。
BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
          指定されたロケールを使って設計モードでインスタンスを生成します。
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
          指定された Locale を使って設計モードでインスタンスを生成します。
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 から呼び出されます。
protected  void bcsPreSerializationHook(ObjectOutputStream oos)
          子の直列化の前に、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)
           
protected  void fireServiceAdded(Class serviceClass)
          新しいサービスを通知する BeanContextServiceEvent をトリガーします。
protected  void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
          サービスの取り消しを通知する BeanContextServiceEvent をトリガーします。
protected  void fireServiceRevoked(Class serviceClass, boolean revokeNow)
           
 BeanContextServices getBeanContextServicesPeer()
           
protected static BeanContextServicesListener getChildBeanContextServicesListener(Object child)
           
 Iterator getCurrentServiceClasses()
           
 Iterator getCurrentServiceSelectors(Class serviceClass)
           
 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 のコールバックです。
 void serviceRevoked(BeanContextServiceRevokedEvent bcssre)
          BeanContextServicesListener のコールバックです。
 
クラス java.beans.beancontext.BeanContextSupport から継承したメソッド
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
 
クラス java.beans.beancontext.BeanContextChildSupport から継承したメソッド
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContext
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

services

protected transient HashMap services
protected transient HashMap services フィールドへのすべてのアクセスは、そのオブジェクトについて同期がとられます。

serializable

protected transient int serializable

proxy

protected transient BeanContextServicesSupport.BCSSProxyServiceProvider proxy

bcsListeners

protected transient ArrayList bcsListeners
コンストラクタの詳細

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle,
                                  boolean dTime,
                                  boolean visible)

BeanContextServicesSupport のインスタンスを生成します。

パラメータ:
peer - 実装の提供先となるピア BeanContext。このオブジェクトが自身のピアである場合は null
lcle - この BeanContext の現在の Locale
dtime - 初期状態。設計モードの場合は true、実行時モードの場合は false
visible - 初期状態での可視性

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle,
                                  boolean dtime)
指定された Locale を使って設計モードでインスタンスを生成します。
パラメータ:
peer - 実装の提供先となるピア BeanContext。このオブジェクトが自身のピアである場合は null
lcle - この BeanContext の現在の Locale
dtime - 初期状態。設計モードの場合は true、実行時モードの場合は false

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle)
指定されたロケールを使って設計モードでインスタンスを生成します。
パラメータ:
peer - 実装の提供先となるピア BeanContext。このオブジェクトが自身のピアである場合は null
lcle - この BeanContext の現在の Locale

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer)
ピアを使ってインスタンスを生成します。
パラメータ:
peer - 実装を提供するピア BeanContext。このオブジェクトが自身のピアである場合は null

BeanContextServicesSupport

public BeanContextServicesSupport()
ほかのオブジェクトの委譲でないインスタンスを生成します。
メソッドの詳細

initialize

public void initialize()
サブクラスの一時的な状態を初期化するために、作成時および直列化復元時に BeanContextSupport のスーパークラスによって呼び出されます。サブクラスはこのメソッドを包み込んでもかまいませんが、オーバーライドしたり、直接呼び出したりすることはできません。
オーバーライド:
クラス BeanContextSupport 内の initialize

getBeanContextServicesPeer

public BeanContextServices getBeanContextServicesPeer()
戻り値:
このオブジェクトによる実装の提供先となる BeanContext のインスタンス

createBCSChild

protected BeanContextSupport.BCSChild createBCSChild(Object targetChild,
                                                     Object peer)

サブクラスは、このメソッドをオーバーライドすることにより、セットに子を追加する add() メソッドやほかの Collection メソッドをオーバーライドすることなく、Child の独自のサブクラスを挿入することができます。

パラメータ:
targetChild - Child を生成する子
peer - targetChild およびピアが BeanContextProxy によって関連付けられている場合はそのピア
オーバーライド:
クラス BeanContextSupport 内の createBCSChild

createBCSSServiceProvider

protected BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider(Class sc,
                                                                                   BeanContextServiceProvider bcsp)
サブクラスはこのメソッドをオーバーライドすることにより、インスタンス生成のために addService() をオーバーライドすることなく、BCSSServiceProvider の新しいサブクラスを生成することができます。

addBeanContextServicesListener

public void addBeanContextServicesListener(BeanContextServicesListener bcsl)
BeanContextServicesListener を追加します。
定義:
インタフェース BeanContextServices 内の addBeanContextServicesListener

removeBeanContextServicesListener

public void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
BeanContextServicesListener を削除します。
定義:
インタフェース BeanContextServices 内の removeBeanContextServicesListener

addService

public boolean addService(Class serviceClass,
                          BeanContextServiceProvider bcsp)
サービスを追加します。
定義:
インタフェース BeanContextServices 内の addService

addService

protected boolean addService(Class serviceClass,
                             BeanContextServiceProvider bcsp,
                             boolean fireEvent)
サービスを追加します。

revokeService

public void revokeService(Class serviceClass,
                          BeanContextServiceProvider bcsp,
                          boolean revokeCurrentServicesNow)
サービスを削除します。
定義:
インタフェース BeanContextServices 内の revokeService

hasService

public boolean hasService(Class serviceClass)
サービスを持ちます。そのサービスは委譲されることもあります。
定義:
インタフェース BeanContextServices 内の hasService

getService

public Object getService(BeanContextChild child,
                         Object requestor,
                         Class serviceClass,
                         Object serviceSelector,
                         BeanContextServiceRevokedListener bcsrl)
                  throws TooManyListenersException
サービスを取得します。そのサービスは委譲されることもあります。
定義:
インタフェース BeanContextServices 内の getService

releaseService

public void releaseService(BeanContextChild child,
                           Object requestor,
                           Object service)
サービスを解放します。
定義:
インタフェース BeanContextServices 内の releaseService

getCurrentServiceClasses

public Iterator getCurrentServiceClasses()
定義:
インタフェース BeanContextServices 内の getCurrentServiceClasses
戻り値:
現在登録されているすべてのサービスクラスの反復子

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors(Class serviceClass)
定義:
インタフェース BeanContextServices 内の getCurrentServiceSelectors
戻り値:
指定されたサービスで利用可能な、現在登録されているすべてのサービスセレクタ (存在する場合) の反復子

serviceAvailable

public void serviceAvailable(BeanContextServiceAvailableEvent bcssae)
BeanContextServicesListener のコールバックです。この BeanContextService がこのサービスをまだ実装していない場合は、現在登録されているすべてのリスナーおよび BeanContextServices の子にイベントを送ります。サブクラスはこのメソッドをオーバーライドまたは包み込むことにより、独自の送信セマンティクスを実装することができます。
オーバーライド:
クラス BeanContextChildSupport 内の serviceAvailable

serviceRevoked

public void serviceRevoked(BeanContextServiceRevokedEvent bcssre)
BeanContextServicesListener のコールバックです。この BeanContextService がまだこのサービスを実装していない場合は、現在登録されているすべてのリスナーおよび BeanContextServices の子にイベントを送ります。

サブクラスは、このメソッドをオーバーライドするか包み込むことで、独自の伝播セマンティクスを実装できます。

オーバーライド:
クラス BeanContextChildSupport 内の serviceRevoked

getChildBeanContextServicesListener

protected static final BeanContextServicesListener getChildBeanContextServicesListener(Object child)
戻り値:
指定された子の BeanContextServicesListener (存在する場合)

childJustRemovedHook

protected void childJustRemovedHook(Object child,
                                    BeanContextSupport.BCSChild bcsc)
子が正常に削除されたあとで、スーパークラスの子の削除オペレーションから呼び出されます。同期化されている子を使って呼び出されます。このサブクラスは、この子が BeanContextChild である場合に、この子が使用しているすべてのサービスをただちに取り消すためにこのフックを使用します。サブクラスは、子の削除に関する独自の副作用を実装するためにこのメソッドを包み込むことができます。
オーバーライド:
クラス BeanContextSupport 内の childJustRemovedHook

releaseBeanContextResources

protected void releaseBeanContextResources()
入れ子になっている BeanContext から取得したリソースを解放するよう BeanContextChild に通知するために、setBeanContext から呼び出されます。このメソッドは親から取得されるすべてのサービスを取り消します。サブクラスは、独自のセマンティクスを実装するためにこのメソッドを包み込むことができます。
オーバーライド:
クラス BeanContextChildSupport 内の releaseBeanContextResources

initializeBeanContextResources

protected void initializeBeanContextResources()
入れ子になっている BeanContext から取得したリソースを割り当てるよう BeanContextChild に通知するために、setBeanContext から呼び出されます。

サブクラスは、このメソッドを包み込むことで独自のセマンティクスを実装できます。

オーバーライド:
クラス BeanContextChildSupport 内の initializeBeanContextResources

fireServiceAdded

protected final void fireServiceAdded(Class serviceClass)
新しいサービスを通知する BeanContextServiceEvent をトリガーします。

fireServiceAdded

protected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae)

fireServiceRevoked

protected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
サービスの取り消しを通知する BeanContextServiceEvent をトリガーします。

fireServiceRevoked

protected final void fireServiceRevoked(Class serviceClass,
                                        boolean revokeNow)

bcsPreSerializationHook

protected void bcsPreSerializationHook(ObjectOutputStream oos)
                                throws IOException
子の直列化の前に、BeanContextSupport の writeObject から呼び出されます。このクラスは、クラス内のすべての Serializable の BeanContextServiceProviders を直列化します。サブクラスは、子を直列化する前に行われる必要がある独自の直列化処理を挿入するためにこのメソッドを包み込むことができます。
オーバーライド:
クラス BeanContextSupport 内の bcsPreSerializationHook

bcsPreDeserializationHook

protected void bcsPreDeserializationHook(ObjectInputStream ois)
                                  throws IOException,
                                         ClassNotFoundException
子の直列化復元の前に BeanContextSupport の readObject から呼び出されます。このクラスは、それ以前に直列化されたすべての Serializable の BeanContextServiceProviders を直列化復元することにより、直列化復元されたときに子がそれらを利用できるようにします。サブクラスは、子を直列化する前に行われる必要がある独自の直列化処理を挿入するためにこのメソッドを包み込むことができます。
オーバーライド:
クラス BeanContextSupport 内の bcsPreDeserializationHook

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.