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
- 関連項目:
-
フィールドのサマリー
フィールド修飾子と型フィールド説明protected BeanContextBeanコンテキストです。このBeanContextChildが入れ子になっているBeanContext。protected PropertyChangeSupportこのBeanContextChildSupportに関連付けられたPropertyChangeSupport。protected boolean試行されたsetBeanContext操作に対してスローされたPropertyChangeVetoExceptionが少なくとも1つあることを示すフラグ。protected VetoableChangeSupportこのBeanContextChildSupportに関連付けられたVetoableChangeSupport。 -
コンストラクタのサマリー
コンストラクタコンストラクタ説明JavaBeanコンポーネント自体を実装するために、このクラスのサブクラス化が行われたBeanContextChildSupportを構築します。JavaBeanコンポーネント自体がBeanContextChildを実装し、これをカプセル化しているBeanContextChildSupportを構築します。BeanContextChildインタフェースはこの実装に委譲されます。 -
メソッドのサマリー
修飾子と型メソッド説明void特定のプロパティのPropertyChangeListenerを追加します。void特定のプロパティのVetoableChangeListenerを追加します。voidfirePropertyChange(String name, Object oldValue, Object newValue) 登録されているすべてのリスナーにバウンド・プロパティの更新を通知します。voidfireVetoableChange(String name, Object oldValue, Object newValue) 登録されているすべてのリスナーに拒否可能プロパティの更新を通知します。このBeanContextChildSupportの入れ子になっているBeanContextを取得します。このBeanContextChildSupportに関連付けられたBeanContextChildを取得します。protected voidこのメソッドは、独自の初期化動作を提供するためにサブクラスによってオーバーライドされることがあります。booleanこのクラスがほかのクラスの委譲であるかどうかを報告します。protected voidこのメソッドは、独自の解放動作を提供するためにサブクラスによってオーバーライドされることがあります。void特定のプロパティのPropertyChangeListenerを削除します。voidVetoableChangeListenerを削除します。void入れ子になっているBeanContextから新しいサービスを使用できます。void入れ子になっているBeanContextによって提供されるサービスが無効になっています。voidこのBeanContextChildSupportのBeanContextを設定します。booleanvalidatePendingSetBeanContext(BeanContext newValue) 入れ子になっているBeanContextプロパティ値の保留中の変更を検証するなどの目的でsetBeanContextから呼び出されます。
-
フィールド詳細
-
beanContextChildPeer
public BeanContextChild beanContextChildPeerこのBeanContextChildが入れ子になっているBeanContext。 -
pcSupport
protected PropertyChangeSupport pcSupportこのBeanContextChildSupportに関連付けられたPropertyChangeSupport。 -
vcSupport
protected VetoableChangeSupport vcSupportこのBeanContextChildSupportに関連付けられたVetoableChangeSupport。 -
beanContext
protected transient BeanContext beanContextBeanコンテキストです。 -
rejectedSetBCOnce
protected transient boolean rejectedSetBCOnce試行されたsetBeanContext操作に対してスローされたPropertyChangeVetoExceptionが少なくとも1つあることを示すフラグ。
-
-
コンストラクタの詳細
-
BeanContextChildSupport
public BeanContextChildSupport()JavaBeanコンポーネント自体を実装するために、このクラスのサブクラス化が行われたBeanContextChildSupportを構築します。 -
BeanContextChildSupport
public BeanContextChildSupport(BeanContextChild bcc) JavaBeanコンポーネント自体がBeanContextChildを実装し、これをカプセル化しているBeanContextChildSupportを構築します。BeanContextChildインタフェースはこの実装に委譲されます。- パラメータ:
bcc- 基礎となるBeanContextChild
-
-
メソッドの詳細
-
setBeanContext
public void setBeanContext(BeanContext bc) throws PropertyVetoException このBeanContextChildSupportのBeanContextを設定します。- 定義:
setBeanContext、インタフェースBeanContextChild- パラメータ:
bc-BeanContextプロパティに割り当てる新しい値- 例外:
PropertyVetoException- 変更が拒否された場合
-
getBeanContext
public BeanContext getBeanContext()このBeanContextChildSupportの入れ子になっているBeanContextを取得します。- 定義:
getBeanContext、インタフェースBeanContextChild- 戻り値:
- この
BeanContextChildSupportの入れ子になっているBeanContext。
-
addPropertyChangeListener
public void addPropertyChangeListener(String name, PropertyChangeListener pcl) 特定のプロパティのPropertyChangeListenerを追加します。 同じリスナー・オブジェクトを複数回追加できます。 各プロパティでは、リスナーがそのプロパティに追加された回数だけリスナーが呼び出されます。nameまたはpclがnullの場合、例外はスローされず、何も処理は行われません。- 定義:
addPropertyChangeListener、インタフェースBeanContextChild- パラメータ:
name- 待機しているプロパティの名前pcl- 追加するPropertyChangeListener
-
removePropertyChangeListener
public void removePropertyChangeListener(String name, PropertyChangeListener pcl) 特定のプロパティのPropertyChangeListenerを削除します。 指定したプロパティの同じイベント・ソースにpclが2回以上追加された場合は、削除されたあとに1回少ない通知が行われます。nameがnullの場合、例外はスローされず、何も処理は行われません。pclがnullの場合、または指定されたプロパティに追加されなかった場合、例外はスローされず、何も処理は行われません。- 定義:
removePropertyChangeListener、インタフェースBeanContextChild- パラメータ:
name- 待機していたプロパティの名前pcl- 削除されるPropertyChangeListener
-
addVetoableChangeListener
public void addVetoableChangeListener(String name, VetoableChangeListener vcl) 特定のプロパティのVetoableChangeListenerを追加します。 同じリスナー・オブジェクトを複数回追加できます。 各プロパティでは、リスナーがそのプロパティに追加された回数だけリスナーが呼び出されます。nameまたはvclがnullの場合、例外はスローされず、何も処理は行われません。- 定義:
addVetoableChangeListener、インタフェースBeanContextChild- パラメータ:
name- 待機しているプロパティの名前vcl- 追加するVetoableChangeListener
-
removeVetoableChangeListener
public void removeVetoableChangeListener(String name, VetoableChangeListener vcl) VetoableChangeListenerを削除します。 指定したプロパティの同じイベント・ソースにpclが2回以上追加された場合は、削除されたあとに1回少ない通知が行われます。nameがnullの場合、例外はスローされず、何も処理は行われません。vclがnullの場合、または指定されたプロパティに追加されなかった場合、例外はスローされず、何も処理は行われません。- 定義:
removeVetoableChangeListener、インタフェースBeanContextChild- パラメータ:
name- 待機していたプロパティの名前vcl- 削除するVetoableChangeListener
-
serviceRevoked
public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) 入れ子になっているBeanContextによって提供されるサービスが無効になっています。 サブクラスは、独自の動作を実装するためにこのメソッドをオーバーライドできます。- 定義:
serviceRevoked、インタフェースBeanContextServiceRevokedListener- パラメータ:
bcsre- サービスの取消しの結果としてトリガーされたBeanContextServiceRevokedEvent
-
serviceAvailable
public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) 入れ子になっているBeanContextから新しいサービスを使用できます。 サブクラスは、独自の動作を実装するためにこのメソッドをオーバーライドできます。- 定義:
serviceAvailable、インタフェースBeanContextServicesListener- パラメータ:
bcsae- サービスが使用可能になった結果としてトリガーされたBeanContextServiceAvailableEvent
-
getBeanContextChildPeer
public BeanContextChild getBeanContextChildPeer()このBeanContextChildSupportに関連付けられたBeanContextChildを取得します。- 戻り値:
- このクラスの
BeanContextChildピア
-
isDelegated
public boolean isDelegated()このクラスがほかのクラスの委譲であるかどうかを報告します。- 戻り値:
- このクラスがほかのクラスの委譲である場合はtrue
-
firePropertyChange
-
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プロパティから取得されます。
-