JavaTM Platform
Standard Ed. 6

java.beans.beancontext
인터페이스 BeanContextServiceProvider

기존의 구현 클래스의 일람:
BeanContextServicesSupport.BCSSProxyServiceProvider


public interface BeanContextServiceProvider

BeanContext 의 주된 기능의 1 개는, JavaBeans 와 BeanContextServiceProvider 를 서로 인식시키기 위해서(때문에) 동작하는 것입니다.

BeanContext 내에서 상자로 된 JavaBean 는, 서비스를 표현하는 Java Class 객체의 참조에 근거해, 그 BeanContext 에 「서비스」의 인스턴스를 제공하도록(듯이) 요구하는 일이 있습니다.

문맥, 또는 상자가 되어 있는 문맥에 그러한 서비스가 등록되어 있는 경우 (문맥은 서비스 요구를 채우도록, 자신의 문맥에 위양), 그 서비스에 관련한 BeanContextServiceProvider 는 그 서비스의 인스턴스를 제공하도록(듯이) 요구됩니다.

ServcieProvider 는, 항상 같은 인스턴스를 돌려주는 경우라고 요구 마다 새로운 인스턴스를 생성하는 경우가 있습니다.


메소드의 개요
 Iterator getCurrentServiceSelectors (BeanContextServices  bcs, Class  serviceClass)
          BeanContextServices 에 의해 불려 갑니다.
 Object getService (BeanContextServices  bcs, Object  requestor, Class  serviceClass, Object  serviceSelector)
          BeanContextServices 에 의해 불려 갑니다.
 void releaseService (BeanContextServices  bcs, Object  requestor, Object  service)
          BeanContextServices 에 의해 호출 됩니다.
 

메소드의 상세

getService

Object  getService(BeanContextServices  bcs,
                  Object  requestor,
                  Class  serviceClass,
                  Object  serviceSelector)
BeanContextServices 에 의해 불려 갑니다. 이 메소드는 이 BeanContextServiceProvider 로부터의 서비스의 인스턴스를 요구합니다.

파라미터:
bcs - 이 특정의 요구에 관련했다 BeanContextServices. 이 파라미터는 BeanContextServiceProvider 가 복수의 소스로부터의 서비스 요구를 식별할 수 있도록(듯이) 하는
requestor - 서비스를 요구하는 객체
serviceClass - 요구되는 서비스
serviceSelector - 특정의 서비스의 서비스 의존 파라미터, 또는 해당하지 않는 경우는 null
반환값:
요구된 서비스에의 참조

releaseService

void releaseService(BeanContextServices  bcs,
                    Object  requestor,
                    Object  service)
BeanContextServices 에 의해 호출 됩니다. 이 메소드는, 상자가 된 BeanContextChild (또는 BeanContextChild 에 관련한 임의의 객체)의, 지정된 서비스에의 참조를 해제합니다.

파라미터:
bcs - 이 특정의 해제 요구에 관련했다 BeanContextServices
requestor - 서비스의 해제을 요구하는 객체
service - 해제되는 서비스

getCurrentServiceSelectors

Iterator  getCurrentServiceSelectors(BeanContextServices  bcs,
                                    Class  serviceClass)
BeanContextServices 에 의해 불려 갑니다. 이 메소드는, 지정된 서비스의 현재의 서비스 셀렉터를 가져옵니다. 서비스 셀렉터는 서비스 고유의 파라미터로, 표준적인 예에는 다음의 것이 포함됩니다. 서비스 구현 클래스의 생성자 의 파라미터, 특정의 서비스의 프로퍼티의 값, 또는 기존의 구현의 맵에의 키입니다.

파라미터:
bcs - 이 요구의 BeanContextServices 객체
serviceClass - 지정된 서비스
반환값:
지정된 serviceClass 의 현재의 서비스 셀렉터

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.