JavaTM Platform
Standard Ed. 6

java.beans.beancontext
クラス BeanContextChildSupport

java.lang.Object
  上位を拡張 java.beans.beancontext.BeanContextChildSupport
すべての実装されたインタフェース:
BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, Serializable, EventListener
直系の既知のサブクラス:
BeanContextSupport

public class BeanContextChildSupport
extends Object
implements BeanContextChild, BeanContextServicesListener, Serializable

BeanContextChild プロトコルの実装をサポートするための一般的なサポートクラスです。 このクラスは、直接サブクラス化されるか、あるいはカプセル化されて委譲されることにより、指定されたコンポーネント用としてこのインタフェースを実装します。

導入されたバージョン:
1.2
関連項目:
BeanContext, BeanContextServices, BeanContextChild, 直列化された形式

フィールドの概要
protected  BeanContext beanContext
           
 BeanContextChild beanContextChildPeer
          この BeanContextChild が入れ子になる BeanContext です。
protected  PropertyChangeSupport pcSupport
          この BeanContextChildSupport に関連した PropertyChangeSupport です。
protected  boolean rejectedSetBCOnce
          setBeanContext 操作に対してスローされた PropertyChangeVetoException が少なくとも 1 つあることを示すフラグです。
protected  VetoableChangeSupport vcSupport
          この BeanContextChildSupport に関連した VetoableChangeSupport です。
 
コンストラクタの概要
BeanContextChildSupport()
          JavaBean コンポーネント自体を実装するために、このクラスのサブクラス化が行われた BeanContextChildSupport を構築します。
BeanContextChildSupport(BeanContextChild bcc)
          JavaBean コンポーネント自体が BeanContextChild を実装し、これをカプセル化している BeanContextChildSupport を構築します。
 
メソッドの概要
 void addPropertyChangeListener(String name, PropertyChangeListener pcl)
          特定のプロパティーの PropertyChangeListener を追加します。
 void addVetoableChangeListener(String name, VetoableChangeListener vcl)
          特定のプロパティーの VetoableChangeListener を追加します。
 void firePropertyChange(String name, Object oldValue, Object newValue)
          登録されているすべてのリスナーにバウンドプロパティーの更新を通知します。
 void fireVetoableChange(String name, Object oldValue, Object newValue)
          登録されているすべてのリスナーに拒否可能プロパティーの更新を通知します。
 BeanContext getBeanContext()
          この BeanContextChildSupportBeanContext を取得します。
 BeanContextChild getBeanContextChildPeer()
          この BeanContextChildSupport に関連した BeanContextChild を取得します。
protected  void initializeBeanContextResources()
          このメソッドは、独自の初期化動作を提供するためにサブクラスによってオーバーライドされることがあります。
 boolean isDelegated()
          このクラスが他のクラスの委譲であるかどうかを報告します。
protected  void releaseBeanContextResources()
          このメソッドは、独自の解放動作を提供するためにサブクラスによってオーバーライドされることがあります。
 void removePropertyChangeListener(String name, PropertyChangeListener pcl)
          特定のプロパティーの PropertyChangeListener を削除します。
 void removeVetoableChangeListener(String name, VetoableChangeListener vcl)
          VetoableChangeListener を削除します。
 void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
          入れ子になっている BeanContext から新しいサービスを使用できます。
 void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
          入れ子になっている BeanContext によって提供されるサービスが無効になっています。
 void setBeanContext(BeanContext bc)
          この BeanContextChildSupportBeanContext を設定します。
 boolean validatePendingSetBeanContext(BeanContext newValue)
          入れ子になっている BeanContext プロパティー値の保留中の変更を検証するなどの目的で setBeanContext から呼び出されます。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

beanContextChildPeer

public BeanContextChild beanContextChildPeer
この BeanContextChild が入れ子になる BeanContext です。


pcSupport

protected PropertyChangeSupport pcSupport
この BeanContextChildSupport に関連した PropertyChangeSupport です。


vcSupport

protected VetoableChangeSupport vcSupport
この BeanContextChildSupport に関連した VetoableChangeSupport です。


beanContext

protected transient BeanContext beanContext

rejectedSetBCOnce

protected transient boolean rejectedSetBCOnce
setBeanContext 操作に対してスローされた PropertyChangeVetoException が少なくとも 1 つあることを示すフラグです。

コンストラクタの詳細

BeanContextChildSupport

public BeanContextChildSupport()
JavaBean コンポーネント自体を実装するために、このクラスのサブクラス化が行われた BeanContextChildSupport を構築します。


BeanContextChildSupport

public BeanContextChildSupport(BeanContextChild bcc)
JavaBean コンポーネント自体が BeanContextChild を実装し、これをカプセル化している BeanContextChildSupport を構築します。BeanContextChild インタフェースはこの実装に委譲されます。

メソッドの詳細

setBeanContext

public void setBeanContext(BeanContext bc)
                    throws PropertyVetoException
この BeanContextChildSupportBeanContext を設定します。

定義:
インタフェース BeanContextChild 内の setBeanContext
パラメータ:
bc - BeanContext プロパティーに割り当てる 新しい値
例外:
PropertyVetoException - 変更が拒否された場合
PropertyVetoException

getBeanContext

public BeanContext getBeanContext()
この BeanContextChildSupportBeanContext を取得します。

定義:
インタフェース BeanContextChild 内の getBeanContext
戻り値:
この BeanContextChildSupport の 入れ子になっている BeanContext

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener pcl)
特定のプロパティーの PropertyChangeListener を追加します。同じリスナーオブジェクトを複数回追加できます。各プロパティーでは、リスナーがそのプロパティーに追加された回数だけリスナーが呼び出されます。name または pcl が null の場合は、例外はスローされず、何も処理は行われません。

定義:
インタフェース BeanContextChild 内の addPropertyChangeListener
パラメータ:
name - 待機しているプロパティーの名前
pcl - 追加する PropertyChangeListener

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener pcl)
特定のプロパティーの PropertyChangeListener を削除します。指定したプロパティーの同じイベントソースに pcl が 2 回以上追加された場合は、削除されたあとに、追加された回数よりも 1 回少ない通知が行われます。name が null の場合は、例外はスローされず、何も処理は行われません。pcl が null の場合、または指定されたプロパティーに追加されなかった場合は、例外はスローされず、何も処理は行われません。

定義:
インタフェース BeanContextChild 内の removePropertyChangeListener
パラメータ:
name - 待機していたプロパティーの名前
pcl - 削除する PropertyChangeListener

addVetoableChangeListener

public void addVetoableChangeListener(String name,
                                      VetoableChangeListener vcl)
特定のプロパティーの VetoableChangeListener を追加します。同じリスナーオブジェクトを複数回追加できます。各プロパティーでは、リスナーがそのプロパティーに追加された回数だけリスナーが呼び出されます。name または vcl が null の場合は、例外はスローされず、何も処理は行われません。

定義:
インタフェース BeanContextChild 内の addVetoableChangeListener
パラメータ:
name - 待機しているプロパティーの名前
vcl - 追加される VetoableChangeListener

removeVetoableChangeListener

public void removeVetoableChangeListener(String name,
                                         VetoableChangeListener vcl)
VetoableChangeListener を削除します。指定したプロパティーの同じイベントソースに pcl が 2 回以上追加された場合は、削除されたあとに、追加された回数よりも 1 回少ない通知が行われます。name が null の場合は、例外はスローされず、何も処理は行われません。vcl が null の場合、または指定されたプロパティーに追加されなかった場合は、例外はスローされず、何も処理は行われません。

定義:
インタフェース BeanContextChild 内の removeVetoableChangeListener
パラメータ:
name - 待機していたプロパティーの名前
vcl - 削除される VetoableChangeListener

serviceRevoked

public void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
入れ子になっている BeanContext によって提供されるサービスが無効になっています。 サブクラスは、独自の動作を実装するためにこのメソッドをオーバーライドできます。

定義:
インタフェース BeanContextServiceRevokedListener 内の serviceRevoked
パラメータ:
bcsre - サービスの取り消しによってトリガーされた BeanContextServiceRevokedEvent

serviceAvailable

public void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
入れ子になっている BeanContext から新しいサービスを使用できます。 サブクラスは、独自の動作を実装するためにこのメソッドをオーバーライドできます。

定義:
インタフェース BeanContextServicesListener 内の serviceAvailable
パラメータ:
bcsae - サービスが使用可能になったためにトリガーされた BeanContextServiceAvailableEvent

getBeanContextChildPeer

public BeanContextChild getBeanContextChildPeer()
この BeanContextChildSupport に関連した BeanContextChild を取得します。

戻り値:
このクラスの BeanContextChild のピア

isDelegated

public boolean isDelegated()
このクラスが他のクラスの委譲であるかどうかを報告します。

戻り値:
このクラスが他のクラスの委譲である場合は true

firePropertyChange

public void firePropertyChange(String name,
                               Object oldValue,
                               Object newValue)
登録されているすべてのリスナーにバウンドプロパティーの更新を通知します。古い値と新しい値が等しく、null でない場合、イベントはトリガーされません。

パラメータ:
name - 変更されたプロパティーのプログラム名
oldValue - 古いプロパティー値
newValue - 新しいプロパティー値

fireVetoableChange

public void fireVetoableChange(String name,
                               Object oldValue,
                               Object newValue)
                        throws PropertyVetoException
登録されているすべてのリスナーに拒否可能プロパティーの更新を通知します。変更が拒否された場合は、すべてを古い値へ戻す新しいイベントをトリガーしてから、再度 PropertyVetoException をスローします。

古い値と新しい値が等しく、null でない場合、イベントはトリガーされません。

パラメータ:
name - 変更されるプロパティーの プログラム名
oldValue - 古いプロパティー値
newValue - 新しいプロパティー値
例外:
PropertyVetoException - 受け取り側でプロパティー変更の ロールバックを指定している場合

validatePendingSetBeanContext

public boolean validatePendingSetBeanContext(BeanContext newValue)
入れ子になっている BeanContext プロパティー値の保留中の変更を検証するなどの目的で setBeanContext から呼び出されます。false が返されると、setBeanContext は PropertyVetoException をスローします。

パラメータ:
newValue - BeanContext プロパティーに要求されている 新しい値
戻り値:
変更操作が拒否される場合は true

releaseBeanContextResources

protected void releaseBeanContextResources()
このメソッドは、独自の解放動作を提供するためにサブクラスによってオーバーライドされることがあります。このメソッドを呼び出すと、オブジェクトはその BeanContext 内で入れ子ではなくなっているため、現在の BeanContext プロパティーから取得され、このインスタンスによって保持されているすべてのリソースが解放されます。


initializeBeanContextResources

protected void initializeBeanContextResources()
このメソッドは、独自の初期化動作を提供するためにサブクラスによってオーバーライドされることがあります。このメソッドを呼び出すと、BeanContextChild によって要求されるすべてのリソースが現在の BeanContext プロパティーから取得されます。


JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。