Module
java.desktop
Class BeanContextServicesSupport.BCSSProxyServiceProvider
- java.lang.Object
-
- java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider
-
- All Implemented Interfaces:
-
BeanContextServiceProvider,BeanContextServiceRevokedListener,EventListener
- Enclosing class:
- BeanContextServicesSupport
protected class BeanContextServicesSupport.BCSSProxyServiceProvider extends Object implements BeanContextServiceProvider, BeanContextServiceRevokedListener
-
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 Iterator<?>getCurrentServiceSelectors(BeanContextServices bcs, Class<?> serviceClass)由BeanContextServices调用,此方法获取指定服务的当前服务选择器。ObjectgetService(BeanContextServices bcs, Object requestor, Class<?> serviceClass, Object serviceSelector)通过调用BeanContextServices,这种方法从这个请求服务的实例BeanContextServiceProvider。voidreleaseService(BeanContextServices bcs, Object requestor, Object service)该方法由BeanContextServices调用,释放嵌套的BeanContextChild(或任何与BeanContextChild相关联的任意对象)对指定服务的引用。voidserviceRevoked(BeanContextServiceRevokedEvent bcsre)已命名的服务已被撤销。 此服务的getService请求将不再满足。
-
-
-
方法详细信息
-
getService
public Object getService(BeanContextServices bcs, Object requestor, Class<?> serviceClass, Object serviceSelector)
描述从接口BeanContextServiceProvider复制通过调用BeanContextServices,这种方法从这个请求服务的实例BeanContextServiceProvider。- Specified by:
-
getService在接口BeanContextServiceProvider - 参数
-
bcs- 与此特定请求相关联的BeanContextServices。 此参数使BeanContextServiceProvider能够区分来自多个来源的服务请求。 -
requestor- 请求服务的对象 -
serviceClass- 请求的服务 -
serviceSelector- 特定服务的服务相关参数,如果不适用,null。 - 结果
- 对所请求的服务的引用
-
releaseService
public void releaseService(BeanContextServices bcs, Object requestor, Object service)
描述从接口BeanContextServiceProvider复制此方法由BeanContextServices调用,释放嵌套的BeanContextChild(或任何与BeanContextChild相关联的任意对象)对指定服务的引用。- Specified by:
-
releaseService在接口BeanContextServiceProvider - 参数
-
bcs- 与此特定发布请求相关联的BeanContextServices -
requestor- 请求释放服务的对象 -
service- 要发布的服务
-
getCurrentServiceSelectors
public Iterator<?> getCurrentServiceSelectors(BeanContextServices bcs, Class<?> serviceClass)
描述从接口BeanContextServiceProvider复制此方法由BeanContextServices调用,获取指定服务的当前服务选择器。 服务选择器是一个特定于服务的参数,其典型示例可以包括:服务实现类的构造函数的参数,特定服务属性的值或现有实现的映射的键。- Specified by:
-
getCurrentServiceSelectors在接口BeanContextServiceProvider - 参数
-
bcs- 该请求的BeanContextServices -
serviceClass- 指定的服务 - 结果
- 当前服务选择器为指定的serviceClass
-
serviceRevoked
public void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
已命名的服务已被撤销。 此服务的getService请求将不再满足。- Specified by:
-
serviceRevoked在接口BeanContextServiceRevokedListener - 参数
-
bcsre- 这位BeanContextServiceRevokedEvent收到的BeanContextServiceRevokedEvent。
-
-