Module java.desktop
Package java.beans.beancontext
Class BeanContextServicesSupport.BCSSProxyServiceProvider
java.lang.Object
java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider
protected class BeanContextServicesSupport.BCSSProxyServiceProvider extends Object implements BeanContextServiceProvider, BeanContextServiceRevokedListener
子类可以继承此嵌套类,以表示每个BeanContextServiceProvider的代理。
-
Method Summary
Modifier and TypeMethodDescriptionIterator<?> getCurrentServiceSelectors(BeanContextServices bcs, Class<?> serviceClass) 被BeanContextServices调用,此方法获取指定服务的当前服务选择器。getService(BeanContextServices bcs, Object requestor, Class<?> serviceClass, Object serviceSelector) 被BeanContextServices调用,此方法从此BeanContextServiceProvider请求服务的实例。voidreleaseService(BeanContextServices bcs, Object requestor, Object service) 被BeanContextServices调用,此方法释放嵌套的BeanContextChild(或与BeanContextChild关联的任意对象)对指定服务的引用。void名为的服务已被撤销。对于此服务的getService请求将不再被满足。
-
Method Details
-
getService
public Object getService(BeanContextServices bcs, Object requestor, Class<?> serviceClass, Object serviceSelector) 从接口复制的描述:BeanContextServiceProvider被BeanContextServices调用,此方法从此BeanContextServiceProvider请求服务的实例。- 指定者:
-
getService在接口BeanContextServiceProvider - 参数:
-
bcs- 与此特定请求相关联的BeanContextServices。此参数使BeanContextServiceProvider能够区分来自多个来源的服务请求。 -
requestor- 请求服务的对象 -
serviceClass- 请求的服务 -
serviceSelector- 特定服务的服务相关参数,例如:服务实现类的构造函数的参数,特定服务属性的值,或现有实现的映射中的键。 - 返回:
- 请求服务的引用
-
releaseService
从接口复制的描述:BeanContextServiceProvider被BeanContextServices调用,此方法释放嵌套的BeanContextChild(或与BeanContextChild关联的任意对象)对指定服务的引用。- 指定者:
-
releaseService在接口BeanContextServiceProvider - 参数:
-
bcs- 与此特定释放请求相关联的BeanContextServices -
requestor- 请求释放服务的对象 -
service- 要释放的服务
-
getCurrentServiceSelectors
从接口复制的描述:BeanContextServiceProvider被BeanContextServices调用,此方法获取指定服务的当前服务选择器。服务选择器是一个服务特定参数,典型示例包括:服务实现类的构造函数的参数,特定服务属性的值,或现有实现的映射中的键。- 指定者:
-
getCurrentServiceSelectors在接口BeanContextServiceProvider - 参数:
-
bcs- 此请求的BeanContextServices -
serviceClass- 指定的服务 - 返回:
- 指定serviceClass的当前服务选择器
-
serviceRevoked
从接口复制的描述:BeanContextServiceRevokedListener名为的服务已被撤销。对于此服务的getService请求将不再被满足。- 指定者:
-
serviceRevoked在接口BeanContextServiceRevokedListener - 参数:
-
bcsre- 此监听器接收到的BeanContextServiceRevokedEvent
-