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
Beanコンテキストです。このBeanContextChild
が入れ子になっているBeanContext
。protected PropertyChangeSupport
このBeanContextChildSupport
に関連付けられているPropertyChangeSupport
。protected boolean
試行されたsetBeanContext操作に対してスローされたPropertyChangeVetoException
が少なくとも1つあることを示すフラグ。protected VetoableChangeSupport
このBeanContextChildSupport
に関連付けられているVetoableChangeSupport
。 -
コンストラクタのサマリー
コンストラクタ説明JavaBeanコンポーネント自体を実装するために、このクラスのサブクラス化が行われたBeanContextChildSupportを構築します。JavaBeanコンポーネント自体がBeanContextChildを実装し、これをカプセル化しているBeanContextChildSupportを構築します。BeanContextChildインタフェースはこの実装に委譲されます。 -
メソッドのサマリー
修飾子と型メソッド説明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)
登録されているすべてのリスナーに拒否可能プロパティの更新を通知します。このBeanContextChildSupport
の入れ子になっているBeanContext
を取得します。このBeanContextChildSupport
に関連付けられているBeanContextChild
を取得します。protected void
このメソッドは、独自の初期化動作を提供するためにサブクラスによってオーバーライドされることがあります。boolean
このクラスがほかのクラスの委譲であるかどうかを報告します。protected void
このメソッドは、独自の解放動作を提供するためにサブクラスによってオーバーライドされることがあります。void
removePropertyChangeListener(String name, PropertyChangeListener pcl)
特定のプロパティのPropertyChangeListenerを削除します。void
removeVetoableChangeListener(String name, VetoableChangeListener vcl)
VetoableChangeListener
を削除します。void
入れ子になっているBeanContextから新しいサービスを使用できます。void
入れ子になっているBeanContextによって提供されるサービスが無効になっています。void
このBeanContextChildSupport
のBeanContext
を設定します。boolean
validatePendingSetBeanContext(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
登録されているすべてのリスナーにバウンド・プロパティの更新を通知します。 古い値と新しい値が等しく、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プロパティから取得されます。
-