Java Platform 1.2

Interface BeanContextServiceProvider

All Known Implementing Classes:

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


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


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


public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
                                           Class serviceClass)
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.