public class BeanContextServicesSupport extends BeanContextSupport implements BeanContextServices
这个助手类提供了一种实用的java.beans.beancontext.beancontextservices接口实现。
由于这类直接实现beancontextservices接口,类可以,目的是可以通过子类化实现,或者通过另一个通过beancontextproxy接口的这个类的实例代表团。
| Modifier and Type | Class and Description |
|---|---|
protected class |
BeanContextServicesSupport.BCSSChild |
protected class |
BeanContextServicesSupport.BCSSProxyServiceProvider |
protected static class |
BeanContextServicesSupport.BCSSServiceProvider
子类可以嵌套类的子类添加一beancontextservicesprovider行为。
|
BeanContextSupport.BCSChild, BeanContextSupport.BCSIterator| Modifier and Type | Field and Description |
|---|---|
protected ArrayList |
bcsListeners
对
BeanContextServicesListener对象列表。
|
protected BeanContextServicesSupport.BCSSProxyServiceProvider |
proxy
为
BeanContextServiceProvider代表。
|
protected int |
serializable
对一个序列化
BeanContextServceProvider实例的数量。
|
protected HashMap |
services
所有的访问的
protected transient HashMap services 字段应该同步对象
|
bcmListeners, children, designTime, locale, okToUseGuibeanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupportglobalHierarchyLockPROPERTYNAME| Constructor and Description |
|---|
BeanContextServicesSupport()
创建一个不是另一个对象的委托的实例
|
BeanContextServicesSupport(BeanContextServices peer)
创建一个对等体的实例
|
BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
使用指定的区域设置创建一个实例
|
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
使用指定的区域设置和设计模式创建一个实例。
|
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
构建了一个BeanContextServicesSupport的实例
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBeanContextServicesListener(BeanContextServicesListener bcsl)
添加一个beancontextserviceslistener
|
boolean |
addService(类 serviceClass, BeanContextServiceProvider bcsp)
添加一个服务
|
protected boolean |
addService(类 serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
添加一个服务
|
protected void |
bcsPreDeserializationHook(ObjectInputStream ois)
所谓的beancontextsupport readObject才将孩子…
|
protected void |
bcsPreSerializationHook(ObjectOutputStream oos)
所谓的beancontextsupport writeObject在序列化的孩子…
|
protected void |
childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
“从超类孩子去除手术后孩子已成功删除。
|
protected BeanContextSupport.BCSChild |
createBCSChild(Object targetChild, Object peer)
子类可以重写此方法以插入自己的子类的孩子无需重写()或其他的收集方法,增加孩子的设置。
|
protected BeanContextServicesSupport.BCSSServiceProvider |
createBCSSServiceProvider(类 sc, BeanContextServiceProvider bcsp)
子类可以重写此方法创建新的子类bcssserviceprovider不用重写addservice()为了实例化。
|
protected void |
fireServiceAdded(BeanContextServiceAvailableEvent bcssae)
火灾
BeanContextServiceAvailableEvent表明一个新的服务成为可能。
|
protected void |
fireServiceAdded(类 serviceClass)
火灾
BeanContextServiceEvent通知新的服务。
|
protected void |
fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
火灾
BeanContextServiceEvent通知服务被撤销。
|
protected void |
fireServiceRevoked(类 serviceClass, boolean revokeNow)
火灾
BeanContextServiceRevokedEvent表示一个特定的服务不再可用。
|
BeanContextServices |
getBeanContextServicesPeer()
获取与此相关的
BeanContextServices
BeanContextServicesSupport。
|
protected static BeanContextServicesListener |
getChildBeanContextServicesListener(Object child)
得到
BeanContextServicesListener(如果有)指定的孩子。
|
Iterator |
getCurrentServiceClasses()
获取此上下文的当前可用的服务。
|
Iterator |
getCurrentServiceSelectors(类 serviceClass)
获取服务依赖的服务参数列表(服务选择器)为指定的服务,通过对基础beancontextserviceprovider调用getcurrentserviceselectors()。
|
Object |
getService(BeanContextChild child, Object requestor, 类 serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
获得一个可能被委派的服务
|
boolean |
hasService(类 serviceClass)
有一个服务,这可能会被委派
|
void |
initialize()
通过建设和反序列化过程中BeanContextSupport superclass叫初始化类瞬态。
|
protected void |
initializeBeanContextResources()
所谓的setbeancontext通知beancontextchild分配从筑巢beancontext获得资源。
|
protected void |
releaseBeanContextResources()
所谓的setbeancontext通知beancontextchild释放从筑巢beancontext获得资源。
|
void |
releaseService(BeanContextChild child, Object requestor, Object service)
发布服务
|
void |
removeBeanContextServicesListener(BeanContextServicesListener bcsl)
删除一个beancontextserviceslistener
|
void |
revokeService(类 serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
删除服务
|
void |
serviceAvailable(BeanContextServiceAvailableEvent bcssae)
BeanContextServicesListener传播事件回调,目前所有注册的监听器和beancontextservices孩子,如果这beancontextservice尚未实施这项服务本身。
|
void |
serviceRevoked(BeanContextServiceRevokedEvent bcssre)
BeanContextServicesListener传播事件回调,目前所有注册的监听器和beancontextservices孩子,如果这beancontextservice尚未实施这项服务本身。
|
add, addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, childDeserializedHook, childJustAddedHook, classEquals, clear, contains, containsAll, containsKey, copyChildren, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, instantiateChild, isDesignTime, isEmpty, isSerializing, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildrenaddPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBeanContextMembershipListener, 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, okToUseGuiprotected transient HashMap services
protected transient HashMap services 字段应该同步对象
protected transient int serializable
protected transient BeanContextServicesSupport.BCSSProxyServiceProvider proxy
protected transient ArrayList bcsListeners
public BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
构建了一个BeanContextServicesSupport的实例
peer -同行beancontext我们提供一个实现,如果为空的对象是自己的同伴
lcle目前这beancontext现场。
dTime -初始状态,如果在设计模式中,如果运行时错误。
visible -初始可见性。
public BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
peer -同行beancontext我们提供一个实现,如果为空的对象是自己的同伴
lcle目前这beancontext现场。
dtime -初始状态,如果在设计模式中,如果运行时错误。
public BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
peer -同行beancontext我们提供一个实现,如果为空的对象是自己的同伴
lcle目前这beancontext现场。
public BeanContextServicesSupport(BeanContextServices peer)
peer -同行beancontext我们提供一个实现,如果为空的对象是自己的同伴
public BeanContextServicesSupport()
public void initialize()
initialize 方法重写,继承类
BeanContextSupport
public BeanContextServices getBeanContextServicesPeer()
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer)
子类可以重写此方法以插入自己的子类的孩子无需重写()或其他的收集方法,增加孩子的设置。
createBCSChild 方法重写,继承类
BeanContextSupport
targetChild -孩子代表创造的孩子
peer -同行如果targetchild和同伴关系的beancontextproxy
protected BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider(类 sc, BeanContextServiceProvider bcsp)
sc -班
bcsp -服务提供商
public void addBeanContextServicesListener(BeanContextServicesListener bcsl)
addBeanContextServicesListener 接口
BeanContextServices
bcsl -
BeanContextServicesListener添加
NullPointerException -如果参数为空
public void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
removeBeanContextServicesListener 接口
BeanContextServices
bcsl -
BeanContextServicesListener从上下文删除
public boolean addService(类 serviceClass, BeanContextServiceProvider bcsp)
addService 接口
BeanContextServices
serviceClass -服务类
bcsp -服务提供商
protected boolean addService(类 serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
serviceClass -服务类
bcsp -服务提供商
fireEvent是否事件应该被解雇
public void revokeService(类 serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
revokeService 接口
BeanContextServices
serviceClass -服务类
bcsp -服务提供商
revokeCurrentServicesNow是否撤销服务
public boolean hasService(类 serviceClass)
hasService 接口
BeanContextServices
serviceClass -服务有问题
public Object getService(BeanContextChild child, Object requestor, 类 serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException
getService 接口
BeanContextServices
child -与此请求关联的
BeanContextChild
requestor -对象请求服务
serviceClass -请求的服务类
serviceSelector -服务相关参数
bcsrl -
BeanContextServiceRevokedListener通知如果服务应该成为后来撤销
null命名服务
TooManyListenersException -如果有太多的听众
public void releaseService(BeanContextChild child, Object requestor, Object service)
releaseService 接口
BeanContextServices
child -
BeanContextChild
requestor -请求
service -服务
public Iterator getCurrentServiceClasses()
BeanContextServices
getCurrentServiceClasses 接口
BeanContextServices
public Iterator getCurrentServiceSelectors(类 serviceClass)
BeanContextServices
getCurrentServiceSelectors 接口
BeanContextServices
serviceClass -指定服务
public void serviceAvailable(BeanContextServiceAvailableEvent bcssae)
serviceAvailable 接口
BeanContextServicesListener
serviceAvailable 方法重写,继承类
BeanContextChildSupport
bcssae - beancontextserviceavailableevent解雇由于服务成为可能
public void serviceRevoked(BeanContextServiceRevokedEvent bcssre)
serviceRevoked 接口
BeanContextServiceRevokedListener
serviceRevoked 方法重写,继承类
BeanContextChildSupport
bcssre -
BeanContextServiceRevokedEvent解雇作为一个服务被撤销
protected static final BeanContextServicesListener getChildBeanContextServicesListener(Object child)
child -指定的孩子
protected void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
childJustRemovedHook 方法重写,继承类
BeanContextSupport
child -孩子
bcsc - bcschild
protected void releaseBeanContextResources()
releaseBeanContextResources 方法重写,继承类
BeanContextChildSupport
protected void initializeBeanContextResources()
initializeBeanContextResources 方法重写,继承类
BeanContextChildSupport
protected final void fireServiceAdded(类 serviceClass)
serviceClass -服务类
protected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae)
bcssae -
BeanContextServiceAvailableEvent
protected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
bcsre -
BeanContextServiceRevokedEvent
protected final void fireServiceRevoked(类 serviceClass, boolean revokeNow)
serviceClass -服务类
revokeNow -事件是否应被撤销了
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException
bcsPreSerializationHook 方法重写,继承类
BeanContextSupport
oos -
ObjectOutputStream使用序列化期间
IOException如果序列化失败
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException
bcsPreDeserializationHook 方法重写,继承类
BeanContextSupport
ois -
ObjectInputStream使用在反序列化期间
IOException如果反序列化失败
ClassNotFoundException -如果没有找到所需要的类
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.