Java Platform 1.2

java.beans.beancontext
Interface BeanContextServices

All Known Implementing Classes:
BeanContextServicesSupport

public abstract interface BeanContextServices
extends BeanContext, BeanContextServicesListener

The BeanContextServices interface provides a mechanism for a BeanContext to expose generic "services" to the BeanContextChild objects within.


Fields inherited from class java.beans.beancontext.BeanContext
globalHierarchyLock
 
Fields inherited from class java.beans.DesignMode
PROPERTYNAME
 
Method Summary
 void addBeanContextServicesListener(BeanContextServicesListener bcsl)
          add a BeanContextServicesListener to this BeanContext
 boolean addService(Class serviceClass, BeanContextServiceProvider serviceProvider)
          add a service to this BeanContext
 Iterator getCurrentServiceClasses()
          return the currently available services
 Iterator getCurrentServiceSelectors(Class serviceClass)
           
 Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
           
 boolean hasService(Class serviceClass)
           
 void releaseService(BeanContextChild child, Object requestor, Object service)
          release the service reference
 void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
          remove a BeanContextServicesListener from this BeanContext
 void revokeService(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)
          remove a service from this BeanContext
 
Methods inherited from interface java.beans.beancontext.BeanContext
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
 
Methods inherited from interface java.beans.beancontext.BeanContextServicesListener
serviceAvailable
 
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.beans.DesignMode
isDesignTime, setDesignTime
 
Methods inherited from interface java.beans.Visibility
avoidingGui, dontUseGui, needsGui, okToUseGui
 
Methods inherited from interface java.beans.beancontext.BeanContextServiceRevokedListener
serviceRevoked
 

Method Detail

addService

public boolean addService(Class serviceClass,
                          BeanContextServiceProvider serviceProvider)
add a service to this BeanContext

revokeService

public void revokeService(Class serviceClass,
                          BeanContextServiceProvider serviceProvider,
                          boolean revokeCurrentServicesNow)
remove a service from this BeanContext

hasService

public boolean hasService(Class serviceClass)
Returns:
true iff the service is available.

getService

public Object getService(BeanContextChild child,
                         Object requestor,
                         Class serviceClass,
                         Object serviceSelector,
                         BeanContextServiceRevokedListener bcsrl)
                  throws TooManyListenersException
Returns:
a reference to this context's named Service as requested or null

releaseService

public void releaseService(BeanContextChild child,
                           Object requestor,
                           Object service)
release the service reference

getCurrentServiceClasses

public Iterator getCurrentServiceClasses()
return the currently available services

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors(Class serviceClass)
Returns:
the currently available service selectors for the named serviceClass

addBeanContextServicesListener

public void addBeanContextServicesListener(BeanContextServicesListener bcsl)
add a BeanContextServicesListener to this BeanContext

removeBeanContextServicesListener

public void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
remove a BeanContextServicesListener from this BeanContext

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.