API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.beans.beancontext. BeanContextServicesSupport View Source
Author(s)
Laurence P. G. Cable
Since
1.2
Version
1.24, 11/17/05
Serial
Hierarchy
 Object
      BeanContextChildSupport
          BeanContextSupport
              BeanContextServicesSupport
Implements
 BeanContextServices
Subclasses
Description
public class BeanContextServicesSupport
  This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
See also:   
Constructors
public BeanContextServicesSupport ()
Create an instance that is not a delegate of another object
public BeanContextServicesSupport (BeanContextServices peer)
  Create an instance with a peer
public BeanContextServicesSupport (BeanContextServices peer, Locale lcle)
  Create an instance using the specified locale
public BeanContextServicesSupport (BeanContextServices peer, Locale lcle, boolean dtime)
  Create an instance using the specified Locale and design mode.
public BeanContextServicesSupport (BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
  Construct a BeanContextServicesSupport instance
Methods
Hide/Show inherited methods
public boolean add (Object targetChild) [Inherited From BeanContextSupport]
  Adds/nests a child within this BeanContext.
public boolean addAll (Collection c) [Inherited From BeanContextSupport]
  add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
public void addBeanContextMembershipListener (BeanContextMembershipListener bcml) [Inherited From BeanContextSupport]
  Adds a BeanContextMembershipListener
public void addBeanContextServicesListener (BeanContextServicesListener bcsl) [Specified in BeanContextServices]
add a BeanContextServicesListener
public void addPropertyChangeListener (String name, PropertyChangeListener pcl) [Inherited From BeanContextChildSupport]
  Add a PropertyChangeListener for a specific property.
public boolean addService (Class serviceClass, BeanContextServiceProvider bcsp) [Specified in BeanContextServices]
add a service
protected boolean addService (Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
add a service
public void addVetoableChangeListener (String name, VetoableChangeListener vcl) [Inherited From BeanContextChildSupport]
  Add a VetoableChangeListener for a specific property.
public boolean avoidingGui () [Inherited From BeanContextSupport]
  Used to determine if the BeanContext child is avoiding using its GUI.
protected Iterator bcsChildren () [Inherited From BeanContextSupport]
  Returns an iterator of all children of this BeanContext.
protectedsynchronized void bcsPreDeserializationHook (ObjectInputStream ois) throws IOException ClassNotFoundException [Overrides BeanContextSupport]
  called from BeanContextSupport readObject before it deserializes the children ...
protectedsynchronized void bcsPreSerializationHook (ObjectOutputStream oos) throws IOException [Overrides BeanContextSupport]
  called from BeanContextSupport writeObject before it serializes the children ...
protected void childDeserializedHook (Object child, BCSChild bcsc) [Inherited From BeanContextSupport]
  Called by readObject with the newly deserialized child and BCSChild.
protected void childJustAddedHook (Object child, BCSChild bcsc) [Inherited From BeanContextSupport]
  subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred.
protected void childJustRemovedHook (Object child, BCSChild bcsc) [Overrides BeanContextSupport]
  called from superclass child removal operations after a child has been successfully removed.
protectedfinalstatic boolean classEquals (Class first, Class second) [Inherited From BeanContextSupport]
  Tests to see if two class objects, or their names are equal.
public void clear () [Inherited From BeanContextSupport]
  clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
public boolean contains (Object o) [Inherited From BeanContextSupport]
  Determines whether or not the specified object is currently a child of this BeanContext.
public boolean containsAll (Collection c) [Inherited From BeanContextSupport]
  Tests to see if all objects in the specified Collection are children of this BeanContext.
public boolean containsKey (Object o) [Inherited From BeanContextSupport]
  Determines whether or not the specified object is currently a child of this BeanContext.
protectedfinal Object copyChildren () [Inherited From BeanContextSupport]
  Gets a copy of the this BeanContext's children.
protected BCSChild createBCSChild (Object targetChild, Object peer) [Overrides BeanContextSupport]
  Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
protected BCSSServiceProvider createBCSSServiceProvider (Class sc, BeanContextServiceProvider bcsp)
subclasses can override this method to create new subclasses of BCSSServiceProvider without having to overrride addService() in order to instantiate.
protectedfinal void deserialize (ObjectInputStream ois, Collection coll) throws IOException ClassNotFoundException [Inherited From BeanContextSupport]
  used by readObject to deserialize a collection.
publicsynchronized void dontUseGui () [Inherited From BeanContextSupport]
notify this instance that it may no longer render a GUI.
protectedfinal void fireChildrenAdded (BeanContextMembershipEvent bcme) [Inherited From BeanContextSupport]
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
protectedfinal void fireChildrenRemoved (BeanContextMembershipEvent bcme) [Inherited From BeanContextSupport]
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
public void firePropertyChange (String name, Object oldValue, Object newValue) [Inherited From BeanContextChildSupport]
  Report a bound property update to any registered listeners.
protectedfinal void fireServiceAdded (BeanContextServiceAvailableEvent bcssae)
  Fires a BeanContextServiceAvailableEvent indicating that a new service has become available.
protectedfinal void fireServiceAdded (Class serviceClass)
Fires a BeanContextServiceEvent notifying of a new service.
protectedfinal void fireServiceRevoked (BeanContextServiceRevokedEvent bcsre)
  Fires a BeanContextServiceEvent notifying of a service being revoked.
protectedfinal void fireServiceRevoked (Class serviceClass, boolean revokeNow)
Fires a BeanContextServiceRevokedEvent indicating that a particular service is no longer available.
public void fireVetoableChange (String name, Object oldValue, Object newValue) throws PropertyVetoException [Inherited From BeanContextChildSupport]
  Report a vetoable property update to any registered listeners.
publicsynchronized BeanContext getBeanContext () [Inherited From BeanContextChildSupport]
  Gets the nesting BeanContext for this BeanContextChildSupport.
public BeanContextChild getBeanContextChildPeer () [Inherited From BeanContextChildSupport]
  Gets the BeanContextChild associated with this BeanContextChildSupport.
public BeanContext getBeanContextPeer () [Inherited From BeanContextSupport]
  Gets the instance of BeanContext that this object is providing the implementation for.
public BeanContextServices getBeanContextServicesPeer ()
  Gets the BeanContextServices associated with this BeanContextServicesSupport.
protectedfinalstatic BeanContextChild getChildBeanContextChild (Object child) [Inherited From BeanContextSupport]
  Gets the BeanContextChild (if any) of the specified child
protectedfinalstatic BeanContextMembershipListener getChildBeanContextMembershipListener (Object child) [Inherited From BeanContextSupport]
  Gets the BeanContextMembershipListener (if any) of the specified child
protectedfinalstatic BeanContextServicesListener getChildBeanContextServicesListener (Object child)
  Gets the BeanContextServicesListener (if any) of the specified child.
protectedfinalstatic PropertyChangeListener getChildPropertyChangeListener (Object child) [Inherited From BeanContextSupport]
  Gets the PropertyChangeListener (if any) of the specified child
protectedfinalstatic Serializable getChildSerializable (Object child) [Inherited From BeanContextSupport]
  Gets the Serializable (if any) associated with the specified Child
protectedfinalstatic VetoableChangeListener getChildVetoableChangeListener (Object child) [Inherited From BeanContextSupport]
  Gets the VetoableChangeListener (if any) of the specified child
protectedfinalstatic Visibility getChildVisibility (Object child) [Inherited From BeanContextSupport]
  Gets the Component (if any) associated with the specified child.
public Iterator getCurrentServiceClasses () [Specified in BeanContextServices]
 
public Iterator getCurrentServiceSelectors (Class serviceClass) [Specified in BeanContextServices]
 
publicsynchronized Locale getLocale () [Inherited From BeanContextSupport]
  Gets the locale for this BeanContext.
public URL getResource (String name, BeanContextChild bcc) [Inherited From BeanContextSupport]
 
public InputStream getResourceAsStream (String name, BeanContextChild bcc) [Inherited From BeanContextSupport]
 
public Object getService (BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException [Specified in BeanContextServices]
obtain a service which may be delegated
publicsynchronized boolean hasService (Class serviceClass) [Specified in BeanContextServices]
has a service, which may be delegated
public void initialize () [Overrides BeanContextSupport]
  called by BeanContextSupport superclass during construction and deserialization to initialize subclass transient state.
protectedsynchronized void initializeBeanContextResources () [Overrides BeanContextChildSupport]
  called from setBeanContext to notify a BeanContextChild to allocate resources obtained from the nesting BeanContext.
public Object instantiateChild (String beanName) throws IOException ClassNotFoundException [Inherited From BeanContextSupport]
  The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
public boolean isDelegated () [Inherited From BeanContextChildSupport]
  Reports whether or not this class is a delegate of another.
publicsynchronized boolean isDesignTime () [Inherited From BeanContextSupport]
  Reports whether or not this object is in currently in design time mode.
public boolean isEmpty () [Inherited From BeanContextSupport]
  Reports whether or not this BeanContext is empty.
public boolean isSerializing () [Inherited From BeanContextSupport]
  Is this BeanContext in the process of being serialized?
public Iterator iterator () [Inherited From BeanContextSupport]
  Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
publicsynchronized boolean needsGui () [Inherited From BeanContextSupport]
  This method is typically called from the environment in order to determine if the implementor "needs" a GUI.
publicsynchronized void okToUseGui () [Inherited From BeanContextSupport]
Notify this instance that it may now render a GUI
public void propertyChange (PropertyChangeEvent pce) [Inherited From BeanContextSupport]
subclasses may envelope to monitor child property changes.
publicfinal void readChildren (ObjectInputStream ois) throws IOException ClassNotFoundException [Inherited From BeanContextSupport]
When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization
protectedsynchronized void releaseBeanContextResources () [Overrides BeanContextChildSupport]
  called from setBeanContext to notify a BeanContextChild to release resources obtained from the nesting BeanContext.
public void releaseService (BeanContextChild child, Object requestor, Object service) [Specified in BeanContextServices]
release a service
public boolean remove (Object targetChild) [Inherited From BeanContextSupport]
  Removes a child from this BeanContext.
protected boolean remove (Object targetChild, boolean callChildSetBC) [Inherited From BeanContextSupport]
  internal remove used when removal caused by unexpected setBeanContext or by remove() invocation.
public boolean removeAll (Collection c) [Inherited From BeanContextSupport]
  remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
public void removeBeanContextMembershipListener (BeanContextMembershipListener bcml) [Inherited From BeanContextSupport]
  Removes a BeanContextMembershipListener
public void removeBeanContextServicesListener (BeanContextServicesListener bcsl) [Specified in BeanContextServices]
remove a BeanContextServicesListener
public void removePropertyChangeListener (String name, PropertyChangeListener pcl) [Inherited From BeanContextChildSupport]
  Remove a PropertyChangeListener for a specific property.
public void removeVetoableChangeListener (String name, VetoableChangeListener vcl) [Inherited From BeanContextChildSupport]
  Removes a VetoableChangeListener.
public boolean retainAll (Collection c) [Inherited From BeanContextSupport]
  retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
public void revokeService (Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow) [Specified in BeanContextServices]
remove a service
protectedfinal void serialize (ObjectOutputStream oos, Collection coll) throws IOException [Inherited From BeanContextSupport]
  Used by writeObject to serialize a Collection.
public void serviceAvailable (BeanContextServiceAvailableEvent bcssae) [Overrides BeanContextChildSupport]
  BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.
public void serviceRevoked (BeanContextServiceRevokedEvent bcssre) [Overrides BeanContextChildSupport]
  BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.
publicsynchronized void setBeanContext (BeanContext bc) throws PropertyVetoException [Inherited From BeanContextChildSupport]
  Sets the BeanContext for this BeanContextChildSupport.
publicsynchronized void setDesignTime (boolean dTime) [Inherited From BeanContextSupport]
  Sets the new design time value for this BeanContext.
publicsynchronized void setLocale (Locale newLocale) throws PropertyVetoException [Inherited From BeanContextSupport]
  Sets the locale of this BeanContext.
public int size () [Inherited From BeanContextSupport]
  Gets the number of children currently nested in this BeanContext.
public Object toArray () [Inherited From BeanContextSupport]
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
public Object toArray (Object arry) [Inherited From BeanContextSupport]
  Gets an array containing all children of this BeanContext that match the types contained in arry.
protected boolean validatePendingAdd (Object targetChild) [Inherited From BeanContextSupport]
  Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext.
protected boolean validatePendingRemove (Object targetChild) [Inherited From BeanContextSupport]
  Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext.
public boolean validatePendingSetBeanContext (BeanContext newValue) [Inherited From BeanContextChildSupport]
  Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value.
public void vetoableChange (PropertyChangeEvent pce) throws PropertyVetoException [Inherited From BeanContextSupport]
subclasses may envelope to monitor veto child property changes.
publicfinal void writeChildren (ObjectOutputStream oos) throws IOException [Inherited From BeanContextSupport]
  Used to serialize all children of this BeanContext.
Fields
Hide/Show inherited fields
protectedtransient ArrayList bcmListeners [Inherited From BeanContextSupport]
all accesses to the protected ArrayList bcmListeners field shall be synchronized on that object.
protectedtransient ArrayList bcsListeners
List of BeanContextServicesListener objects.
protectedtransient BeanContext beanContext [Inherited From BeanContextChildSupport]
public BeanContextChild beanContextChildPeer [Inherited From BeanContextChildSupport]
The BeanContext in which this BeanContextChild is nested.
protectedtransient HashMap children [Inherited From BeanContextSupport]
all accesses to the protected HashMap children field shall be synchronized on that object.
protected boolean designTime [Inherited From BeanContextSupport]
A boolean indicating whether or not this object is currently in design time mode.
publicfinalstatic Object globalHierarchyLock [Inherited From BeanContextServices]
This global lock is used by both BeanContext and BeanContextServices implementors to serialize changes in a BeanContext hierarchy and any service requests etc.
protected Locale locale [Inherited From BeanContextSupport]
The current locale of this BeanContext.
protected boolean okToUseGui [Inherited From BeanContextSupport]
A boolean indicating if this instance may now render a GUI.
protected PropertyChangeSupport pcSupport [Inherited From BeanContextChildSupport]
The PropertyChangeSupport associated with this BeanContextChildSupport.
publicfinalstatic String PROPERTYNAME = "designTime" [Inherited From BeanContextServices]
The standard value of the propertyName as fired from a BeanContext or other source of PropertyChangeEvents.
protectedtransient BCSSProxyServiceProvider proxy
Delegate for the BeanContextServiceProvider.
protectedtransient boolean rejectedSetBCOnce [Inherited From BeanContextChildSupport]
A flag indicating that there has been at least one PropertyChangeVetoException thrown for the attempted setBeanContext operation.
protectedtransient int serializable
The number of instances of a serializable BeanContextServceProvider.
pack-privatefinalstatic long serialVersionUID = "-4879613978649577204" [Inherited From BeanContextSupport]
protectedtransient HashMap services
all accesses to the protected transient HashMap services field should be synchronized on that object
protected VetoableChangeSupport vcSupport [Inherited From BeanContextChildSupport]
The VetoableChangeSupport associated with this BeanContextChildSupport.
Nested Classes
  BeanContextServicesSupport.BCSSChild
  BeanContextServicesSupport.BCSSServiceProvider
subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.
  BeanContextServicesSupport.BCSSProxyServiceProvider
  BeanContextSupport.BCSIterator
protected final subclass that encapsulates an iterator but implements a noop remove() method.
  BeanContextSupport.BCSChild
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar