BeanContextServicesSupport

BeanContextServicesSupport (BeanContext 서비스 지원 클래스)

java.beans.beancontext.BeanContextServices 인터페이스의 유틸리티 구현을 제공하는 헬퍼 클래스예요. 이 클래스는 BeanContextServices 인터페이스를 직접 구현하므로, 이 구현을 상속하거나 BeanContextProxy 인터페이스를 통한 위임(delegation) 방식으로 사용할 수 있어요.

출처: Java API Reference

본문

BeanContextServicesSupportBeanContextSupport를 상속하면서 BeanContextServices 인터페이스를 구현하는 클래스예요. BeanContext에 일반적인 서비스를 등록·제공하는 기능을 기본 구현으로 갖춘 클래스랍니다.

BeanContext 안의 자식 객체들이 서비스를 요청할 수 있도록 서비스 등록, 회수, 조회 기능을 제공하고, 서비스가 등록·회수될 때 리스너에게 알리는 기능도 포함해요. BeanContextChild가 서비스를 요청하면 서비스 제공자(BeanContextServiceProvider)를 통해 인스턴스를 얻고, 사용이 끝나면 해제할 수 있어요.

주요 필드와 생성자는 다음과 같아요.

protected transient HashMap<Object, BeanContextServicesSupport.BCSSServiceProvider> services
protected transient int serializable
protected transient BeanContextServicesSupport.BCSSProxyServiceProvider proxy
protected transient ArrayList<BeanContextServicesListener> bcsListeners

public BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
public BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
public BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
public BeanContextServicesSupport(BeanContextServices peer)
  • peer — 서비스를 제공할 대상 BeanContextServices예요.
  • lcle — 로케일, dTime — 디자인 타임 여부, visible — 표시 여부를 의미해요.

이 클래스는 BeanContext, BeanContextServices, DesignMode, Visibility 등 여러 인터페이스를 구현하며 Serializable이라 직렬화가 가능해요.

더 알아보기 (Learn more)

Java 공식 API