所有类


java.beans.beancontext
类 BeanContextServicesSupport

java.lang.Object
  继承者 java.beans.beancontext.BeanContextChildSupport
      继承者 java.beans.beancontext.BeanContextSupport
          继承者 java.beans.beancontext.BeanContextServicesSupport
所有已实现的接口:
BeanContext, BeanContextChild, BeanContextServiceRevokedListener, BeanContextServices, BeanContextServicesListener, DesignMode, PropertyChangeListener, VetoableChangeListener, Visibility, Serializable, Iterable, Collection, EventListener

public class BeanContextServicesSupport
   
   
   
   
   
extends BeanContextSupport
implements BeanContextServices

此帮助器类提供 java.beans.beancontext.BeanContextServices 接口的实用工具实现。

因为此类直接实现 BeanContextServices 接口,所以可以通过创建此实现的子类来使用该类,或者由通过 BeanContextProxy 接口的另一个实例对此类实例的委托来使用该类。

从以下版本开始:
1.2
另请参见:
序列化表格

嵌套类摘要
protected  classBeanContextServicesSupport.BCSSChild
           
protected  classBeanContextServicesSupport.BCSSProxyServiceProvider
           
protected static classBeanContextServicesSupport.BCSSServiceProvider
          子类可以为此嵌套类创建子类,以便为每个 BeanContextServicesProvider 添加行为。
 
从类 java.beans.beancontext.BeanContextSupport 继承的嵌套类/接口
BeanContextSupport.BCSChild, BeanContextSupport.BCSIterator
 
字段摘要
protected  ArrayListbcsListeners
          BeanContextServicesListener 对象的列表。
protected  BeanContextServicesSupport.BCSSProxyServiceProviderproxy
          BeanContextServiceProvider 的委托。
protected  intserializable
          可序列化 BeanContextServceProvider 的实例数。
protected  HashMapservices
          对 protected transient HashMap services 字段的所有访问在该对象上都应该是同步的 (synchronized)。
 
从类 java.beans.beancontext.BeanContextSupport 继承的字段
bcmListeners, children, designTime, locale, okToUseGui
 
从类 java.beans.beancontext.BeanContextChildSupport 继承的字段
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
从接口 java.beans.beancontext.BeanContext 继承的字段
globalHierarchyLock
 
从接口 java.beans.DesignMode 继承的字段
PROPERTYNAME
 
构造方法摘要
BeanContextServicesSupport()
          创建不是另一个对象的代理的实例。
BeanContextServicesSupport(BeanContextServices peer)
          创建一个具有同位体的实例
BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
          使用指定语言环境创建一个实例。
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
          使用指定 Locale 和设计模式创建一个实例。
BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
           构造一个 BeanContextServicesSupport 实例
 
方法摘要
 voidaddBeanContextServicesListener(BeanContextServicesListener bcsl)
          添加一个 BeanContextServicesListener。
 booleanaddService(Class serviceClass, BeanContextServiceProvider bcsp)
          添加服务。
protected  booleanaddService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
          添加服务。
protected  voidbcsPreDeserializationHook(ObjectInputStream ois)
          在反序列化子级之前,从 BeanContextSupport readObject 调用。
protected  voidbcsPreSerializationHook(ObjectOutputStream oos)
          在序列化子级之前,从 BeanContextSupport writeObject 调用。
protected  voidchildJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
          在已成功移除子级之后,从超类的子级移除操作中调用。
protected  BeanContextSupport.BCSChildcreateBCSChild(Object targetChild, Object peer)
           子类可以重写此方法来插入自己的 Child 的子类,而不必重写 add() 或其他将子级添加到集合中的 Collection 方法。
protected  BeanContextServicesSupport.BCSSServiceProvidercreateBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp)
          子类可以重写此方法来创建 BCSSServiceProvider 的新子类,而不必为了实例化而重写 addService()。
protected  voidfireServiceAdded(BeanContextServiceAvailableEvent bcssae)
          触发一个指示新服务已变得可用的 BeanContextServiceAvailableEvent
protected  voidfireServiceAdded(Class serviceClass)
          触发一个通知新服务的 BeanContextServiceEvent
protected  voidfireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
          触发一个通知将被取消的服务的 BeanContextServiceEvent
protected  voidfireServiceRevoked(Class serviceClass, boolean revokeNow)
          触发一个指示某一特定服务不再可用的 BeanContextServiceRevokedEvent
 BeanContextServicesgetBeanContextServicesPeer()
          获得与此 BeanContextServicesSupport 相关联的 BeanContextServices
protected static BeanContextServicesListenergetChildBeanContextServicesListener(Object child)
          获得指定子级的 BeanContextServicesListener(如果有)。
 IteratorgetCurrentServiceClasses()
          获得此上下文的当前可用服务。
 IteratorgetCurrentServiceSelectors(Class serviceClass)
          通过在基础 BeanContextServiceProvider 上调用 getCurrentServiceSelectors() 获得指定服务的与服务有关的服务参数列表(服务选择器)。
 ObjectgetService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
          获得一个可被委托的服务。
 booleanhasService(Class serviceClass)
          具有一个可被委托的服务。
 voidinitialize()
          由 BeanContextSupport 超类在构造和反序列化期间调用,以初始化子类的瞬态。
protected  voidinitializeBeanContextResources()
          从 setBeanContext 中调用,以通知 BeanContextChild 分配从嵌套 BeanContext 中获得的资源。
protected  voidreleaseBeanContextResources()
          从 setBeanContext 中调用,以通知 BeanContextChild 释放从嵌套 BeanContext 中获得的资源。
 voidreleaseService(BeanContextChild child, Object requestor, Object service)
          释放服务。
 voidremoveBeanContextServicesListener(BeanContextServicesListener bcsl)
          移除一个 BeanContextServicesListener。
 voidrevokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
          移除服务。
 voidserviceAvailable(BeanContextServiceAvailableEvent bcssae)
          BeanContextServicesListener 回调,如果此 BeanContextService 自己尚未实现此服务,则将事件传播到所有当前已注册侦听器和 BeanContextServices 子级。
 voidserviceRevoked(BeanContextServiceRevokedEvent bcssre)
          BeanContextServicesListener 回调,如果此 BeanContextService 自己尚未实现此服务,则将事件传播到所有当前已注册侦听器和 BeanContextServices 子级。
 
从类 java.beans.beancontext.BeanContextSupport 继承的方法
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, writeChildren
 
从类 java.beans.beancontext.BeanContextChildSupport 继承的方法
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContext
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 java.beans.beancontext.BeanContext 继承的方法
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
 
从接口 java.beans.beancontext.BeanContextChild 继承的方法
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
 
从接口 java.util.Collection 继承的方法
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
从接口 java.beans.DesignMode 继承的方法
isDesignTime, setDesignTime
 
从接口 java.beans.Visibility 继承的方法
avoidingGui, dontUseGui, needsGui, okToUseGui
 

字段详细信息

services

protected transient HashMap services
protected transient HashMap services 字段的所有访问在该对象上都应该是同步的 (synchronized)。


serializable

protected transient int serializable
可序列化 BeanContextServceProvider 的实例数。


proxy

protected transient BeanContextServicesSupport.BCSSProxyServiceProvider proxy
BeanContextServiceProvider 的委托。


bcsListeners

protected transient ArrayList bcsListeners
BeanContextServicesListener 对象的列表。

构造方法详细信息

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle,
                                  boolean dTime,
                                  boolean visible)

构造一个 BeanContextServicesSupport 实例

参数:
peer - 将为其提供实现的同位体 BeanContext,如果该参数为 null,则此对象是它自己的同位体
lcle - 此 BeanContext 的当前 Locale。
dtime - 初始状态,如果在设计模式下,则该参数为 true,如果在运行状态下,则该参数为 false。
visible - 初始可见性。

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle,
                                  boolean dtime)
使用指定 Locale 和设计模式创建一个实例。

参数:
peer - 将为其提供实现的同位体 BeanContext,如果该参数为 null,则此对象是它自己的同位体
lcle - 此 BeanContext 的当前 Locale。
dtime - 初始状态,如果在设计模式下,则该参数为 true,如果在运行状态下,则该参数为 false。

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer,
                                  Locale lcle)
使用指定语言环境创建一个实例。

参数:
peer - 将为其提供实现的同位体 BeanContext,如果该参数为 null,则此对象是它自己的同位体
lcle - 此 BeanContext 的当前 Locale。

BeanContextServicesSupport

public BeanContextServicesSupport(BeanContextServices peer)
创建一个具有同位体的实例

参数:
peer - 将为其提供实现的同位体 BeanContext,如果该参数为 null,则此对象是它自己的同位体。