Class BeanContextChildSupport
java.lang.Object
java.beans.beancontext.BeanContextChildSupport
- All Implemented Interfaces:
BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, Serializable, EventListener
- Direct Known Subclasses:
BeanContextSupport
@Deprecated(since="23", forRemoval=true) public class BeanContextChildSupport extends Object implements BeanContextChild, BeanContextServicesListener, Serializable
Deprecated, for removal: This API element is subject to removal in a future version.
This is a general support class to provide support for implementing the BeanContextChild protocol. This class may either be directly subclassed, or encapsulated and delegated to in order to implement this interface for a given component.
- Since:
- 1.2
- See Also:
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
protected BeanContext |
beanContext |
Deprecated, for removal: This API element is subject to removal in a future version. The bean context. |
BeanContextChild |
beanContextChildPeer |
Deprecated, for removal: This API element is subject to removal in a future version. The BeanContext in which this BeanContextChild is nested. |
protected PropertyChangeSupport |
pcSupport |
Deprecated, for removal: This API element is subject to removal in a future version. The PropertyChangeSupport associated with this BeanContextChildSupport. |
protected boolean |
rejectedSetBCOnce |
Deprecated, for removal: This API element is subject to removal in a future version. A flag indicating that there has been at least one PropertyChangeVetoException thrown for the attempted setBeanContext operation. |
protected VetoableChangeSupport |
vcSupport |
Deprecated, for removal: This API element is subject to removal in a future version. The VetoableChangeSupport associated with this BeanContextChildSupport. |
Constructor Summary
| Constructor | Description |
|---|---|
BeanContextChildSupport() |
Deprecated, for removal: This API element is subject to removal in a future version. construct a BeanContextChildSupport where this class has been subclassed in order to implement the JavaBean component itself. |
BeanContextChildSupport |
Deprecated, for removal: This API element is subject to removal in a future version. construct a BeanContextChildSupport where the JavaBean component itself implements BeanContextChild, and encapsulates this, delegating that interface to this implementation |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPropertyChangeListener |
Deprecated, for removal: This API element is subject to removal in a future version. Add a PropertyChangeListener for a specific property. |
void |
addVetoableChangeListener |
Deprecated, for removal: This API element is subject to removal in a future version. Add a VetoableChangeListener for a specific property. |
void |
firePropertyChange |
Deprecated, for removal: This API element is subject to removal in a future version. Report a bound property update to any registered listeners. |
void |
fireVetoableChange |
Deprecated, for removal: This API element is subject to removal in a future version. Report a vetoable property update to any registered listeners. |
BeanContext |
getBeanContext() |
Deprecated, for removal: This API element is subject to removal in a future version. Gets the nesting BeanContext for this BeanContextChildSupport. |
BeanContextChild |
getBeanContextChildPeer() |
Deprecated, for removal: This API element is subject to removal in a future version. Gets the BeanContextChild associated with this BeanContextChildSupport. |
protected void |
initializeBeanContextResources() |
Deprecated, for removal: This API element is subject to removal in a future version. This method may be overridden by subclasses to provide their own initialization behaviors. |
boolean |
isDelegated() |
Deprecated, for removal: This API element is subject to removal in a future version. Reports whether or not this class is a delegate of another. |
protected void |
releaseBeanContextResources() |
Deprecated, for removal: This API element is subject to removal in a future version. This method may be overridden by subclasses to provide their own release behaviors. |
void |
removePropertyChangeListener |
Deprecated, for removal: This API element is subject to removal in a future version. Remove a PropertyChangeListener for a specific property. |
void |
removeVetoableChangeListener |
Deprecated, for removal: This API element is subject to removal in a future version. Removes a VetoableChangeListener. |
void |
serviceAvailable |
Deprecated, for removal: This API element is subject to removal in a future version. A new service is available from the nesting BeanContext. |
void |
serviceRevoked |
Deprecated, for removal: This API element is subject to removal in a future version. A service provided by the nesting BeanContext has been revoked. |
void |
setBeanContext |
Deprecated, for removal: This API element is subject to removal in a future version. Sets the BeanContext for this BeanContextChildSupport. |
boolean |
validatePendingSetBeanContext |
Deprecated, for removal: This API element is subject to removal in a future version. Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value. |
Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | Modifier and Type | Method | Description |
|---|---|---|
protected Object |
clone() |
Creates and returns a copy of this object. |
boolean |
equals |
Indicates whether some other object is "equal to" this one. |
protected void |
finalize() |
Deprecated, for removal: This API element is subject to removal in a future version. Finalization is deprecated and subject to removal in a future release. |
final Class |
getClass() |
Returns the runtime class of this Object. |
int |
hashCode() |
Returns a hash code value for this object. |
final void |
notify() |
Wakes up a single thread that is waiting on this object's monitor. |
final void |
notifyAll() |
Wakes up all threads that are waiting on this object's monitor. |
String |
toString() |
Returns a string representation of the object. |
final void |
wait() |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
Field Details
beanContextChildPeer
public BeanContextChild beanContextChildPeer
Deprecated, for removal: This API element is subject to removal in a future version.
The
BeanContext in which this BeanContextChild is nested.pcSupport
protected PropertyChangeSupport pcSupport
Deprecated, for removal: This API element is subject to removal in a future version.
The
PropertyChangeSupport associated with this BeanContextChildSupport.vcSupport
protected VetoableChangeSupport vcSupport
Deprecated, for removal: This API element is subject to removal in a future version.
The
VetoableChangeSupport associated with this BeanContextChildSupport.beanContext
protected transient BeanContext beanContext
Deprecated, for removal: This API element is subject to removal in a future version.
The bean context.
rejectedSetBCOnce
protected transient boolean rejectedSetBCOnce
Deprecated, for removal: This API element is subject to removal in a future version.
A flag indicating that there has been at least one
PropertyChangeVetoException thrown for the attempted setBeanContext operation.Constructor Details
BeanContextChildSupport
public BeanContextChildSupport()
Deprecated, for removal: This API element is subject to removal in a future version.
construct a BeanContextChildSupport where this class has been subclassed in order to implement the JavaBean component itself.
BeanContextChildSupport
public BeanContextChildSupport(BeanContextChild bcc)
Deprecated, for removal: This API element is subject to removal in a future version.
construct a BeanContextChildSupport where the JavaBean component itself implements BeanContextChild, and encapsulates this, delegating that interface to this implementation
- Parameters:
-
bcc- the underlying bean context child
Method Details
setBeanContext
public void setBeanContext(BeanContext bc) throws PropertyVetoException
Deprecated, for removal: This API element is subject to removal in a future version.
Sets the
BeanContext for this BeanContextChildSupport.- Specified by:
-
setBeanContextin interfaceBeanContextChild - Parameters:
-
bc- the new value to be assigned to theBeanContextproperty - Throws:
-
PropertyVetoException- if the change is rejected
getBeanContext
public BeanContext getBeanContext()
Deprecated, for removal: This API element is subject to removal in a future version.
Gets the nesting
BeanContext for this BeanContextChildSupport.- Specified by:
-
getBeanContextin interfaceBeanContextChild - Returns:
- the nesting
BeanContextfor thisBeanContextChildSupport.
addPropertyChangeListener
public void addPropertyChangeListener(String name, PropertyChangeListener pcl)
Deprecated, for removal: This API element is subject to removal in a future version.
Add a PropertyChangeListener for a specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. If
name or pcl is null, no exception is thrown and no action is taken.- Specified by:
-
addPropertyChangeListenerin interfaceBeanContextChild - Parameters:
-
name- The name of the property to listen on -
pcl- ThePropertyChangeListenerto be added
removePropertyChangeListener
public void removePropertyChangeListener(String name, PropertyChangeListener pcl)
Deprecated, for removal: This API element is subject to removal in a future version.
Remove a PropertyChangeListener for a specific property. If
pcl was added more than once to the same event source for the specified property, it will be notified one less time after being removed. If name is null, no exception is thrown and no action is taken. If pcl is null, or was never added for the specified property, no exception is thrown and no action is taken.- Specified by:
-
removePropertyChangeListenerin interfaceBeanContextChild - Parameters:
-
name- The name of the property that was listened on -
pcl- The PropertyChangeListener to be removed
addVetoableChangeListener
public void addVetoableChangeListener(String name, VetoableChangeListener vcl)
Deprecated, for removal: This API element is subject to removal in a future version.
Add a VetoableChangeListener for a specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. If
name or vcl is null, no exception is thrown and no action is taken.- Specified by:
-
addVetoableChangeListenerin interfaceBeanContextChild - Parameters:
-
name- The name of the property to listen on -
vcl- TheVetoableChangeListenerto be added
removeVetoableChangeListener
public void removeVetoableChangeListener(String name, VetoableChangeListener vcl)
Deprecated, for removal: This API element is subject to removal in a future version.
Removes a
VetoableChangeListener. If pcl was added more than once to the same event source for the specified property, it will be notified one less time after being removed. If name is null, no exception is thrown and no action is taken. If vcl is null, or was never added for the specified property, no exception is thrown and no action is taken.- Specified by:
-
removeVetoableChangeListenerin interfaceBeanContextChild - Parameters:
-
name- The name of the property that was listened on -
vcl- TheVetoableChangeListenerto be removed
serviceRevoked
public void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
Deprecated, for removal: This API element is subject to removal in a future version.
A service provided by the nesting BeanContext has been revoked. Subclasses may override this method in order to implement their own behaviors.
- Specified by:
-
serviceRevokedin interfaceBeanContextServiceRevokedListener - Parameters:
-
bcsre- TheBeanContextServiceRevokedEventfired as a result of a service being revoked
serviceAvailable
public void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
Deprecated, for removal: This API element is subject to removal in a future version.
A new service is available from the nesting BeanContext. Subclasses may override this method in order to implement their own behaviors
- Specified by:
-
serviceAvailablein interfaceBeanContextServicesListener - Parameters:
-
bcsae- The BeanContextServiceAvailableEvent fired as a result of a service becoming available
getBeanContextChildPeer
public BeanContextChild getBeanContextChildPeer()
Deprecated, for removal: This API element is subject to removal in a future version.
Gets the
BeanContextChild associated with this BeanContextChildSupport.- Returns:
- the
BeanContextChildpeer of this class
isDelegated
public boolean isDelegated()
Deprecated, for removal: This API element is subject to removal in a future version.
Reports whether or not this class is a delegate of another.
- Returns:
- true if this class is a delegate of another
firePropertyChange
public void firePropertyChange(String name, Object oldValue, Object newValue)
Deprecated, for removal: This API element is subject to removal in a future version.
Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.
- Parameters:
-
name- The programmatic name of the property that was changed -
oldValue- The old value of the property -
newValue- The new value of the property
fireVetoableChange
public void fireVetoableChange(String name, Object oldValue, Object newValue) throws PropertyVetoException
Deprecated, for removal: This API element is subject to removal in a future version.
Report a vetoable property update to any registered listeners. If anyone vetos the change, then fire a new event reverting everyone to the old value and then rethrow the PropertyVetoException.
No event is fired if old and new are equal and non-null.
- Parameters:
-
name- The programmatic name of the property that is about to change -
oldValue- The old value of the property -
newValue- - The new value of the property - Throws:
-
PropertyVetoException- if the recipient wishes the property change to be rolled back.
validatePendingSetBeanContext
public boolean validatePendingSetBeanContext(BeanContext newValue)
Deprecated, for removal: This API element is subject to removal in a future version.
Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value. Returning false will cause setBeanContext to throw PropertyVetoException.
- Parameters:
-
newValue- the new value that has been requested for the BeanContext property - Returns:
-
trueif the change operation is to be vetoed
releaseBeanContextResources
protected void releaseBeanContextResources()
Deprecated, for removal: This API element is subject to removal in a future version.
This method may be overridden by subclasses to provide their own release behaviors. When invoked any resources held by this instance obtained from its current BeanContext property should be released since the object is no longer nested within that BeanContext.
initializeBeanContextResources
protected void initializeBeanContextResources()
Deprecated, for removal: This API element is subject to removal in a future version.
This method may be overridden by subclasses to provide their own initialization behaviors. When invoked any resources required by the BeanContextChild should be obtained from the current BeanContext.
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.