站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Java(TM) 2 Platform, Standard Edition, v1.2.2 API Specification: Interface BeanContextServiceProvider - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

JavaTM 2 Platform
Standard Edition

java.beans.beancontext
Interface BeanContextServiceProvider

All Known Implementing Classes:
BeanContextServicesSupport.BCSSProxyServiceProvider

public 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

JavaTM 2 Platform
Standard Edition

Submit a bug or feature
Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.