public interface BeanContextServices extends BeanContext, BeanContextServicesListener
的beancontextservices接口提供了一个beancontext揭露通用的“服务”的beancontextchild对象机制。
globalHierarchyLockPROPERTYNAME| Modifier and Type | Method and Description |
|---|---|
void |
addBeanContextServicesListener(BeanContextServicesListener bcsl)
增加了一个
BeanContextServicesListener这beancontext
|
boolean |
addService(类 serviceClass, BeanContextServiceProvider serviceProvider)
添加一个服务,这beancontext。
|
Iterator |
getCurrentServiceClasses()
获取此上下文的当前可用的服务。
|
Iterator |
getCurrentServiceSelectors(类 serviceClass)
获取服务依赖的服务参数列表(服务选择器)为指定的服务,通过对基础beancontextserviceprovider调用getcurrentserviceselectors()。
|
Object |
getService(BeanContextChild child, Object requestor, 类 serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
一个
BeanContextChild,或任意对象与
BeanContextChild相关,可以参考目前已注册的服务从它的巢
BeanContextServices通过该方法调用。
|
boolean |
hasService(类 serviceClass)
报告是否一个给定的服务,目前可从这种情况下。
|
void |
releaseService(BeanContextChild child, Object requestor, Object service)
发布
BeanContextChild的(或任何一个beancontextchild相关的任意对象)的
BeanContextServiceProvider releaseservice()底层调用到指定的服务参考。
|
void |
removeBeanContextServicesListener(BeanContextServicesListener bcsl)
除去这一
BeanContextServicesListener
BeanContext
|
void |
revokeService(类 serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)
beancontextserviceproviders希望删除当前注册服务从这个方面可以通过该方法调用。
|
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListeneraddPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContextadd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayisDesignTime, setDesignTimeavoidingGui, dontUseGui, needsGui, okToUseGuiserviceAvailableserviceRevokedboolean addService(类 serviceClass, BeanContextServiceProvider serviceProvider)
BeanContextServiceProviders调用这个方法来登记一个特定的服务这方面的。如果服务已经不是以前的
BeanContextServices添加,将服务与
BeanContextServiceProvider和火灾
BeanContextServiceAvailableEvent所有当前注册
BeanContextServicesListeners。该方法返回
true,表明服务添加成功。如果给定的服务已经添加,此方法只返回
false。
serviceClass -服务添加
serviceProvider与服务相关的
BeanContextServiceProvider
void revokeService(类 serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)
BeanContextServices撤销,火灾
BeanContextServiceRevokedEvent其列出了当前注册
BeanContextServiceRevokedListeners和
BeanContextServicesListeners。
serviceClass -服务撤销这beancontextservices
serviceProvider -这个特定的服务被吊销相关的beancontextserviceprovider
revokeCurrentServicesNow -值
true表示特殊情况下的
BeanContextServiceProvider或
BeanContextServices希望立即终止服务,到指定的服务目前所有优秀的参考。
boolean hasService(类 serviceClass)
serviceClass -服务有问题
Object getService(BeanContextChild child, Object requestor, 类 serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException
BeanContextChild,或任意对象与
BeanContextChild相关,可以参考目前已注册的服务从它的巢
BeanContextServices通过该方法调用。当被调用时,该方法通过对底层
BeanContextServiceProvider调用getservice()方法获取服务。
child -与此请求关联的
BeanContextChild
requestor -对象请求服务
serviceClass -请求的服务类
serviceSelector -服务相关参数
bcsrl -
BeanContextServiceRevokedListener通知如果服务应该成为后来撤销
null命名服务
TooManyListenersException -如果有太多的听众
void releaseService(BeanContextChild child, Object requestor, Object service)
BeanContextChild的(或任何一个beancontextchild相关的任意对象)的
BeanContextServiceProvider releaseservice()底层调用到指定的服务参考。
child -
BeanContextChild
requestor -请求
service -服务
Iterator getCurrentServiceClasses()
Iterator
Iterator getCurrentServiceSelectors(类 serviceClass)
serviceClass -指定服务
void addBeanContextServicesListener(BeanContextServicesListener bcsl)
BeanContextServicesListener这beancontext
bcsl -
BeanContextServicesListener添加
void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
BeanContextServicesListener
BeanContext
bcsl -
BeanContextServicesListener从上下文删除
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.