Java Platform 1.2

java.beans.beancontext
Interface BeanContextServiceProvider

All Known Implementing Classes:
BeanContextServicesSupport.BCSSProxyServiceProvider

public abstract interface BeanContextServiceProvider

One of the primary functions of a BeanContext is to act a as rendezvous between JavaBeans, and BeanContextServiceProviders.

A JavaBean nested within a BeanContext, may ask that BeanContext to provide an instance of a "service", based upon a reference to a Java Class object that represents that service.

If such a service has been registered with the context, or one of its nesting context's, in the case where a context delegate to its context to satisfy a service request, then the BeanContextServiceProvider associated with the service is asked to provide an instance of that service.

The ServcieProvider may always return the same instance, or it may construct a new instance for each request.


Method Summary
 Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass)
           
 Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector)
          request an instance of a service,
 void releaseService(BeanContextServices bcs, Object requestor, Object service)
          release the service
 

Method Detail

getService

public Object getService(BeanContextServices bcs,
                         Object requestor,
                         Class serviceClass,
                         Object serviceSelector)
request an instance of a service,
Parameters:
requestor - The object requesting the service
serviceClass - The service requested
serviceSelector - Additional parameterisation of the service

releaseService

public void releaseService(BeanContextServices bcs,
                           Object requestor,
                           Object service)
release the service

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
                                           Class serviceClass)
Returns:
the current service selectors for the specified serviceClass

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.