org.apache.beehive.controls.runtime.webcontext
Class ControlBeanContextChildSupport

Object
  extended by ControlBeanContextChildSupport
All Implemented Interfaces:
BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, Serializable, EventListener
Direct Known Subclasses:
ControlBeanContextSupport

public class ControlBeanContextChildSupport
extends Object
implements BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, Serializable, EventListener

Implementation of the BeanContextChild api for Beehive controls.

See Also:
Serialized Form

Constructor Summary
ControlBeanContextChildSupport()
          Constructor.
ControlBeanContextChildSupport(BeanContextChild bcc)
          Constructor -- java bean implements BeanContextChild and delegates the interface to this implementation.
 
Method Summary
 void addPropertyChangeListener(String name, PropertyChangeListener pcl)
          Adds a PropertyChangeListener to this BeanContextChild in order to receive a PropertyChangeEvent whenever the specified property has changed.
 void addVetoableChangeListener(String name, VetoableChangeListener vcl)
          Adds a VetoableChangeListener to this BeanContextChild to receive events whenever the specified property changes.
protected  void firePropertyChange(String name, Object oldValue, Object newValue)
          Fire a property change event.
 BeanContext getBeanContext()
          Gets the BeanContext associated with this BeanContextChild.
protected  BeanContextChild getPeer()
          Get the delegate for this child.
protected  void releaseBeanContextResources()
          Release any resources that may have been acumlated from the current bean context, invoked by setBeanContext BEFORE the context is changed.
 void removePropertyChangeListener(String name, PropertyChangeListener pcl)
          Removes a PropertyChangeListener from this BeanContextChild so that it no longer receives PropertyChangeEvents when the specified property is changed.
 void removeVetoableChangeListener(String name, VetoableChangeListener vcl)
          Removes a VetoableChangeListener from this BeanContextChild so that it no longer receives events when the specified property changes.
 void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
          The service named has been registered. getService requests for this service may now be made.
 void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
          The service named has been revoked. getService requests for this service will no longer be satisifed.
 void setBeanContext(BeanContext bc)
          

Objects that implement this interface, shall fire a java.beans.PropertyChangeEvent, with parameters:

propertyName "beanContext", oldValue (the previous nesting BeanContext instance, or null), newValue (the current nesting BeanContext instance, or null).

 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlBeanContextChildSupport

public ControlBeanContextChildSupport()
Constructor.


ControlBeanContextChildSupport

public ControlBeanContextChildSupport(BeanContextChild bcc)
Constructor -- java bean implements BeanContextChild and delegates the interface to this implementation.

Parameters:
bcc -
Method Detail

setBeanContext

public void setBeanContext(BeanContext bc)
                    throws PropertyVetoException

Objects that implement this interface, shall fire a java.beans.PropertyChangeEvent, with parameters:

propertyName "beanContext", oldValue (the previous nesting BeanContext instance, or null), newValue (the current nesting BeanContext instance, or null).

A change in the value of the nesting BeanContext property of this BeanContextChild may be vetoed by throwing the appropriate exception.

Specified by:
setBeanContext in interface BeanContextChild
Parameters:
bc - The BeanContext with which to associate this BeanContextChild.
Throws:
PropertyVetoException

getBeanContext

public BeanContext getBeanContext()
Gets the BeanContext associated with this BeanContextChild.

Specified by:
getBeanContext in interface BeanContextChild
Returns:
the BeanContext associated with this BeanContextChild.

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener pcl)
Adds a PropertyChangeListener to this BeanContextChild in order to receive a PropertyChangeEvent whenever the specified property has changed.

Specified by:
addPropertyChangeListener in interface BeanContextChild
Parameters:
name - the name of the property to listen on
pcl - the PropertyChangeListener to add

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener pcl)
Removes a PropertyChangeListener from this BeanContextChild so that it no longer receives PropertyChangeEvents when the specified property is changed.

Specified by:
removePropertyChangeListener in interface BeanContextChild
Parameters:
name - the name of the property that was listened on
pcl - the PropertyChangeListener to remove

addVetoableChangeListener

public void addVetoableChangeListener(String name,
                                      VetoableChangeListener vcl)
Adds a VetoableChangeListener to this BeanContextChild to receive events whenever the specified property changes.

Specified by:
addVetoableChangeListener in interface BeanContextChild
Parameters:
name - the name of the property to listen on
vcl - the VetoableChangeListener to add

removeVetoableChangeListener

public void removeVetoableChangeListener(String name,
                                         VetoableChangeListener vcl)
Removes a VetoableChangeListener from this BeanContextChild so that it no longer receives events when the specified property changes.

Specified by:
removeVetoableChangeListener in interface BeanContextChild
Parameters:
name - the name of the property that was listened on.
vcl - the VetoableChangeListener to remove.

serviceAvailable

public void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
The service named has been registered. getService requests for this service may now be made.

Specified by:
serviceAvailable in interface BeanContextServicesListener
Parameters:
bcsae - the BeanContextServiceAvailableEvent

serviceRevoked

public void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
The service named has been revoked. getService requests for this service will no longer be satisifed.

Specified by:
serviceRevoked in interface BeanContextServiceRevokedListener
Parameters:
bcsre - the BeanContextServiceRevokedEvent received by this listener.

getPeer

protected BeanContextChild getPeer()
Get the delegate for this child.


firePropertyChange

protected void firePropertyChange(String name,
                                  Object oldValue,
                                  Object newValue)
Fire a property change event.

Parameters:
name -
oldValue -
newValue -

releaseBeanContextResources

protected void releaseBeanContextResources()
Release any resources that may have been acumlated from the current bean context, invoked by setBeanContext BEFORE the context is changed.