|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.beans.beancontext.BeanContextChildSupport
java.beans.beancontext.BeanContextSupport
java.beans.beancontext.BeanContextServicesSupport
public class BeanContextServicesSupport
此說明器類別提供 java.beans.beancontext.BeanContextServices 介面的實用工具實作。
因為此類別直接實作 BeanContextServices 介面,所以可以通過創建此實作的子類別來使用該類別,或者由通過 BeanContextProxy 介面的另一個實例對此類別實例的委託來使用該類別。
| 巢狀類別摘要 | |
|---|---|
protected class |
BeanContextServicesSupport.BCSSChild
|
protected class |
BeanContextServicesSupport.BCSSProxyServiceProvider
|
protected static class |
BeanContextServicesSupport.BCSSServiceProvider
子類別可以為此巢狀類別創建子類別,以便為每個 BeanContextServicesProvider 添加行為。 |
| 從類別 java.beans.beancontext.BeanContextSupport 繼承的巢狀類別/介面 |
|---|
BeanContextSupport.BCSChild, BeanContextSupport.BCSIterator |
| 欄位摘要 | |
|---|---|
protected ArrayList |
bcsListeners
BeanContextServicesListener 物件的列表。 |
protected BeanContextServicesSupport.BCSSProxyServiceProvider |
proxy
BeanContextServiceProvider 的委託。 |
protected int |
serializable
可序列化 BeanContextServceProvider 的實例數。 |
protected HashMap |
services
protected transient HashMap services 欄位的所有存取在該物件上都應該是同步的。 |
| 從類別 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 實例 |
|
| 方法摘要 | |
|---|---|
void |
addBeanContextServicesListener(BeanContextServicesListener bcsl)
添加一個 BeanContextServicesListener。 |
boolean |
addService(Class serviceClass,
BeanContextServiceProvider bcsp)
添加服務。 |
protected boolean |
addService(Class 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)
子類別可以覆寫此方法來插入自己的 Child 的子類別,而不必覆寫 add() 或其他將子級添加到集合中的 Collection 方法。 |
protected BeanContextServicesSupport.BCSSServiceProvider |
createBCSSServiceProvider(Class sc,
BeanContextServiceProvider bcsp)
子類別可以覆寫此方法來創建 BCSSServiceProvider 的新子類別,而不必為了實例化而覆寫 addService()。 |
protected void |
fireServiceAdded(BeanContextServiceAvailableEvent bcssae)
觸發一個指示新服務已變得可用的 BeanContextServiceAvailableEvent。 |
protected void |
fireServiceAdded(Class serviceClass)
觸發一個通知新服務的 BeanContextServiceEvent。 |
protected void |
fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
觸發一個通知將被取消的服務的 BeanContextServiceEvent。 |
protected void |
fireServiceRevoked(Class serviceClass,
boolean revokeNow)
觸發一個指示某一特定服務不再可用的 BeanContextServiceRevokedEvent。 |
BeanContextServices |
getBeanContextServicesPeer()
獲得與此 BeanContextServicesSupport 相關聯的 BeanContextServices。 |
protected static BeanContextServicesListener |
getChildBeanContextServicesListener(Object child)
獲得指定子級的 BeanContextServicesListener(如果有)。 |
Iterator |
getCurrentServiceClasses()
獲得此上下文的當前可用服務。 |
Iterator |
getCurrentServiceSelectors(Class serviceClass)
通過在基礎 BeanContextServiceProvider 上調用 getCurrentServiceSelectors() 獲得指定服務的與服務有關的服務參數列表(服務選擇器)。 |
Object |
getService(BeanContextChild child,
Object requestor,
Class serviceClass,
Object serviceSelector,
BeanContextServiceRevokedListener bcsrl)
獲得一個可被委託的服務。 |
boolean |
hasService(Class serviceClass)
具有一個可被委託的服務。 |
void |
initialize()
由 BeanContextSupport 父級類別在建構和反序列化期間調用,以初始化子類別的瞬態。 |
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(Class serviceClass,
BeanContextServiceProvider bcsp,
boolean revokeCurrentServicesNow)
移除服務。 |
void |
serviceAvailable(BeanContextServiceAvailableEvent bcssae)
BeanContextServicesListener 回調,如果此 BeanContextService 自己尚未實作此服務,則將事件傳播到所有當前已註冊偵聽器和 BeanContextServices 子級。 |
void |
serviceRevoked(BeanContextServiceRevokedEvent bcssre)
BeanContextServicesListener 回調,如果此 BeanContextService 自己尚未實作此服務,則將事件傳播到所有當前已註冊偵聽器和 BeanContextServices 子級。 |
| 從類別 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 |
| 欄位詳細資訊 |
|---|
protected 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,如果該參數為 null,則此物件是它自己的同位體lcle - 此 BeanContext 的當前 Locale。dtime - 初始狀態,如果在設計網要下,則該參數為 true,如果在運行狀態下,則該參數為 false。visible - 初始可見性。
public BeanContextServicesSupport(BeanContextServices peer,
Locale lcle,
boolean dtime)
peer - 將為其提供實作的同位體 BeanContext,如果該參數為 null,則此物件是它自己的同位體lcle - 此 BeanContext 的當前 Locale。dtime - 初始狀態,如果在設計網要下,則該參數為 true,如果在運行狀態下,則該參數為 false。
public BeanContextServicesSupport(BeanContextServices peer,
Locale lcle)
peer - 將為其提供實作的同位體 BeanContext,如果該參數為 null,則此物件是它自己的同位體lcle - 此 BeanContext 的當前 Locale。public BeanContextServicesSupport(BeanContextServices peer)
peer - 將為其提供實作的同位體 BeanContext,如果該參數為 null,則此物件是它自己的同位體。public BeanContextServicesSupport()
| 方法詳細資訊 |
|---|
public void initialize()
BeanContextSupport 中的 initializepublic BeanContextServices getBeanContextServicesPeer()
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild,
Object peer)
子類別可以覆寫此方法來插入自己的 Child 的子類別,而不必覆寫 add() 或其他將子級添加到集合中的 Collection 方法。
BeanContextSupport 中的 createBCSChildtargetChild - 要創建自己的 Child 的子級peer - 同位體,如果 targetChild 和同位體通過 BeanContextProxy 建立聯繫
protected BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider(Class sc,
BeanContextServiceProvider bcsp)
public void addBeanContextServicesListener(BeanContextServicesListener bcsl)
BeanContextServices 中的 addBeanContextServicesListenerbcsl - 要添加的 BeanContextServicesListenerpublic void removeBeanContextServicesListener(BeanContextServicesListener bcsl)
BeanContextServices 中的 removeBeanContextServicesListenerbcsl - 要從此上下文移除的 BeanContextServicesListener
public boolean addService(Class serviceClass,
BeanContextServiceProvider bcsp)
BeanContextServices 中的 addServiceserviceClass - 要添加的服務bcsp - 與該服務相關聯的 BeanContextServiceProvider
protected boolean addService(Class serviceClass,
BeanContextServiceProvider bcsp,
boolean fireEvent)
public void revokeService(Class serviceClass,
BeanContextServiceProvider bcsp,
boolean revokeCurrentServicesNow)
BeanContextServices 中的 revokeServiceserviceClass - 要從此 BeanContextServices 中取消的服務bcsp - 與將取消的特定服務有關聯的 BeanContextServiceProviderrevokeCurrentServicesNow - 值為 true 指示一個異常環境,在該環境中,BeanContextServiceProvider 或 BeanContextServices 希望立即終止為指定服務的所有當前突出參考提供服務。public boolean hasService(Class serviceClass)
BeanContextServices 中的 hasServiceserviceClass - 相關服務
public Object getService(BeanContextChild child,
Object requestor,
Class serviceClass,
Object serviceSelector,
BeanContextServiceRevokedListener bcsrl)
throws TooManyListenersException
BeanContextServices 中的 getServicechild - 與此請求相關聯的 BeanContextChildrequestor - 請求服務的物件serviceClass - 所請求服務的類別serviceSelector - 與服務有關的參數bcsrl - 通知稍後是否應該取消服務的 BeanContextServiceRevokedListener
null
TooManyListenersException
public void releaseService(BeanContextChild child,
Object requestor,
Object service)
BeanContextServices 中的 releaseServicechild - BeanContextChildrequestor - 請求者service - 服務public Iterator getCurrentServiceClasses()
BeanContextServices 複製的描述
BeanContextServices 中的 getCurrentServiceClassespublic Iterator getCurrentServiceSelectors(Class serviceClass)
BeanContextServices 複製的描述
BeanContextServices 中的 getCurrentServiceSelectorsserviceClass - 指定服務
public void serviceAvailable(BeanContextServiceAvailableEvent bcssae)
BeanContextServicesListener 中的 serviceAvailableBeanContextChildSupport 中的 serviceAvailablebcssae - 由於服務變得可用而觸發的 BeanContextServiceAvailableEventpublic void serviceRevoked(BeanContextServiceRevokedEvent bcssre)
BeanContextServiceRevokedListener 中的 serviceRevokedBeanContextChildSupport 中的 serviceRevokedbcssre - 由於取消服務而觸發的 BeanContextServiceRevokedEventprotected static final BeanContextServicesListener getChildBeanContextServicesListener(Object child)
child - 指定子級
protected void childJustRemovedHook(Object child,
BeanContextSupport.BCSChild bcsc)
BeanContextSupport 中的 childJustRemovedHookprotected void releaseBeanContextResources()
BeanContextChildSupport 中的 releaseBeanContextResourcesprotected void initializeBeanContextResources()
BeanContextChildSupport 中的 initializeBeanContextResourcesprotected final void fireServiceAdded(Class serviceClass)
protected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae)
bcssae - BeanContextServiceAvailableEventprotected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre)
bcsre - BeanContextServiceRevokedEvent
protected final void fireServiceRevoked(Class serviceClass,
boolean revokeNow)
protected void bcsPreSerializationHook(ObjectOutputStream oos)
throws IOException
BeanContextSupport 中的 bcsPreSerializationHookIOException
protected void bcsPreDeserializationHook(ObjectInputStream ois)
throws IOException,
ClassNotFoundException
BeanContextSupport 中的 bcsPreDeserializationHookIOException
ClassNotFoundException
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。