Java Doc for ControlBean.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » controls » runtime » bean » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache beehive 1.0.2 src » org.apache.beehive.controls.runtime.bean 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.beehive.controls.runtime.bean.ControlBean

ControlBean
abstract public class ControlBean implements org.apache.beehive.controls.api.bean.ControlBean(Code)
The ControlBean class is an abstract base class for the JavaBean classes generated to support Beehive Controls.

The ControlBean class indirectly implements BeanContextProxy; the org.apache.beehive.controls.api.context.ControlBeanContext that it contains/scopes acts as that proxy.

All support APIs (which may be called from derived subclasses or contextual services) are generally marked as protected and have names that start with an underscore. This avoids the possibility that the name might conflict with a user-defined method on a control's public or extended Control interfaces.

NOTE: Adding public methods should be done with great care; any such method becomes part of the public API, and occupies the method namespace for all controls.



Field Summary
protected  Class_implClass
    

Constructor Summary
protected  ControlBean(org.apache.beehive.controls.api.context.ControlBeanContext context, String id, PropertyMap initProperties, Class controlIntf)
    
Parameters:
  context - the containing ControlBeanContext.

Method Summary
 voidaddInvokeListener(InvokeListener invokeListener)
     Registers a new InvokeListener for this ControlBean.
public  voiddecodeImpl(Object impl)
     Called during XMLDecoder reconstruction of a ControlBean.
 ObjectdispatchEvent(EventRef event, Object[] args)
     Dispatches the requested operation event on the ControlBean.
protected static  voidenforceVersionRequired(String intfName, Version version, VersionRequired versionRequired)
     Enforces the VersionRequired annotation at runtime (called from each ControlBean).
public synchronized  ObjectensureControl()
     Returns the target control instance associated with this ControlBean, performing lazy instantiation and initialization of the instance.
protected  InterceptorensureInterceptor(String n)
     Retrieves interceptor instances, creates them lazily.
protected  voidfirePropertyChange(PropertyKey propertyKey, Object oldValue, Object newValue)
     Delivers a PropertyChangeEvent to any registered PropertyChangeListeners associated with the property referenced by the specified key.
protected  voidfireVetoableChange(PropertyKey propertyKey, Object oldValue, Object newValue)
     Delivers a PropertyChangeEvent to any registered VetoableChangeListeners associated with the property referenced by the specified key.
protected  PropertyMapgetAnnotationMap(AnnotatedElement annotElem)
     Returns the PropertyMap containing values associated with an AnnotatedElement.
final public  BeanContextgetBeanContext()
     Returns the nesting BeanContext for this ControlBean.
final public  ControlBeanContextgetBeanContextProxy()
    
public  ControlBeanContextgetControlBeanContext()
     Returns the bean context instance associated with the this bean, as opposed to the parent context returned by the public getBeanContext() API.
final public  StringgetControlID()
    
final public  ClassgetControlInterface()
     Returns the public interface for this control.
protected  ObjectgetControlProperty(PropertyKey key)
     Returns a property on the ControlBean instance.
protected  ObjectgetControlService(Class serviceClass, Object selector)
     Locates and obtains a context service from the BeanContextServices instance supporting this bean.
protected  TgetEventNotifier(Class<T> eventSet)
    
protected synchronized  ImplInitializergetImplInitializer()
    
 ObjectgetImplementation()
     Returns the implementation instance associated with this ControlBean.
 Vector<InvokeListener>getInvokeListeners()
    
protected  StringgetLocalID()
    
public static  ClassgetMostDerivedInterface(Class controlIntf)
     Computes the most derived ControlInterface for the specified ControlExtension.
protected  String[]getParameterNames(Method m)
     Returns the parameter names for a method on the ControlBean.
protected synchronized  PropertyChangeSupportgetPropertyChangeSupport()
     This protected version is only available to concrete subclasses that expose bound property support.
 BeanPropertyMapgetPropertyMap()
    
abstract protected  MapgetPropertyMapCache()
     Returns the local cache for ControlBean property maps.
protected  ObjectgetRawControlProperty(PropertyKey key)
     Returns a property on the ControlBean instance.
protected synchronized  VetoableChangeSupportgetVetoableChangeSupport()
     This protected version is only available to concrete subclasses that expose bound property support.
 booleanhasSingleThreadedImpl()
     Returns true if the implementation class for this ControlBean requires the framework to ensure thread-safety for it.
protected  voidpostInvoke(Method m, Object[] args, Object retval, Throwable t, String[] interceptorNames, String pivotedInterceptor)
     The postInvoke method is called after all operations on the control.
protected  voidpostInvoke(Method m, Object[] args, Object retval, Throwable t)
     The postInvoke method is called after all operations on the control.
protected  voidpreInvoke(Method m, Object[] args, String[] interceptorNames)
     The preinvoke method is called before all operations on the control.
protected  voidpreInvoke(Method m, Object[] args)
     The preinvoke method is called before all operations on the control.
 voidremoveInvokeListener(InvokeListener invokeListener)
     Deregisters an existing InvokeListener for this ControlBean.
final public synchronized  voidsetBeanContext(BeanContext bc)
     Called by the BeanContextProxy (_cbc) whenever the _parent_ context containing this control bean is changed.
protected  voidsetControlProperty(PropertyKey key, Object o)
     Sets a property on the ControlBean instance.
protected  voidsetEventNotifier(Class<T> eventSet, T notifier)
    
 voidsetLocalID(String localID)
     Set the local (parent-relative) ID for this ControlBean.

Field Detail
_implClass
protected Class _implClass(Code)
The control implementation class bound to this ControlBean




Constructor Detail
ControlBean
protected ControlBean(org.apache.beehive.controls.api.context.ControlBeanContext context, String id, PropertyMap initProperties, Class controlIntf)(Code)

Parameters:
  context - the containing ControlBeanContext. May be null, in which case the bean will attempt toassociate with an active context at runtime (via thread-locals).
Parameters:
  id - the local ID for the control, scoped to the control bean context.
Parameters:
  initProperties - a PropertyMap containing initial properties for the control
Parameters:
  controlIntf - the control interface or extension directly implemented by the control bean




Method Detail
addInvokeListener
void addInvokeListener(InvokeListener invokeListener)(Code)
Registers a new InvokeListener for this ControlBean.



decodeImpl
public void decodeImpl(Object impl)(Code)
Called during XMLDecoder reconstruction of a ControlBean.



dispatchEvent
Object dispatchEvent(EventRef event, Object[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException(Code)
Dispatches the requested operation event on the ControlBean.
See Also:   org.apache.beehive.controls.runtime.bean.ControlContainerContext.dispatchEvent



enforceVersionRequired
protected static void enforceVersionRequired(String intfName, Version version, VersionRequired versionRequired)(Code)
Enforces the VersionRequired annotation at runtime (called from each ControlBean).
Parameters:
  intfName -
Parameters:
  version -
Parameters:
  versionRequired -



ensureControl
public synchronized Object ensureControl()(Code)
Returns the target control instance associated with this ControlBean, performing lazy instantiation and initialization of the instance. REVIEW: could probably improve the granularity of locking here, but start w/ just synchronizing the entire fn.



ensureInterceptor
protected Interceptor ensureInterceptor(String n)(Code)
Retrieves interceptor instances, creates them lazily.



firePropertyChange
protected void firePropertyChange(PropertyKey propertyKey, Object oldValue, Object newValue)(Code)
Delivers a PropertyChangeEvent to any registered PropertyChangeListeners associated with the property referenced by the specified key. This method *should not* be synchronized, as the PropertyChangeSupport has its own built in synchronization mechanisms.



fireVetoableChange
protected void fireVetoableChange(PropertyKey propertyKey, Object oldValue, Object newValue) throws java.beans.PropertyVetoException(Code)
Delivers a PropertyChangeEvent to any registered VetoableChangeListeners associated with the property referenced by the specified key. This method *should not* be synchronized, as the VetoableChangeSupport has its own built in synchronization mechanisms.



getAnnotationMap
protected PropertyMap getAnnotationMap(AnnotatedElement annotElem)(Code)
Returns the PropertyMap containing values associated with an AnnotatedElement. Elements that are associated with the bean's Control interface will be locally cached.



getBeanContext
final public BeanContext getBeanContext()(Code)
Returns the nesting BeanContext for this ControlBean. This is thread-safe even though it is not synchronized.



getBeanContextProxy
final public ControlBeanContext getBeanContextProxy()(Code)
Return the BeanContextService proxy associated with this bean instance



getControlBeanContext
public ControlBeanContext getControlBeanContext()(Code)
Returns the bean context instance associated with the this bean, as opposed to the parent context returned by the public getBeanContext() API.



getControlID
final public String getControlID()(Code)
Returns the control ID for this control



getControlInterface
final public Class getControlInterface()(Code)
Returns the public interface for this control.



getControlProperty
protected Object getControlProperty(PropertyKey key)(Code)
Returns a property on the ControlBean instance. All generated property getter methods will delegate down to this method



getControlService
protected Object getControlService(Class serviceClass, Object selector) throws TooManyListenersException(Code)
Locates and obtains a context service from the BeanContextServices instance supporting this bean. The base design for the BeanContextServicesSupport is that it will delegate up to peers in a nesting context, so a nested control bean will look 'up' to find a service provider.



getEventNotifier
protected T getEventNotifier(Class<T> eventSet)(Code)
Returns an EventNotifier/UnicastEventNotifier for this ControlBean for the target event set



getImplInitializer
protected synchronized ImplInitializer getImplInitializer()(Code)
Obtains an instance of the appropriate ImplInitializer class



getImplementation
Object getImplementation()(Code)
Returns the implementation instance associated with this ControlBean.



getInvokeListeners
Vector<InvokeListener> getInvokeListeners()(Code)
Returns the list of InvokeListeners for this ControlBean



getLocalID
protected String getLocalID()(Code)
Returns the local (parent-relative) ID for this ControlBean



getMostDerivedInterface
public static Class getMostDerivedInterface(Class controlIntf)(Code)
Computes the most derived ControlInterface for the specified ControlExtension.
Parameters:
  controlIntf - the most derived ControlInterfaceControlUtils.getMostDerivedInterface(Class)



getParameterNames
protected String[] getParameterNames(Method m)(Code)
Returns the parameter names for a method on the ControlBean. Actual mapping is done by generated subclasses, so if we reach the base ControlBean implementation, then no parameter names are available for the target method.



getPropertyChangeSupport
protected synchronized PropertyChangeSupport getPropertyChangeSupport()(Code)
This protected version is only available to concrete subclasses that expose bound property support. This method is synchronized to enable lazy instantiation, in the belief that it is a bigger win to avoid allocating when there are no listeners than it is to introduce synchronization overhead on access.



getPropertyMap
BeanPropertyMap getPropertyMap()(Code)
Returns the property map containing the properties for the bean



getPropertyMapCache
abstract protected Map getPropertyMapCache()(Code)
Returns the local cache for ControlBean property maps.



getRawControlProperty
protected Object getRawControlProperty(PropertyKey key)(Code)
Returns a property on the ControlBean instance. This version does not coerce an annotation type property from a PropertyMap to a proxy instance of the type.



getVetoableChangeSupport
protected synchronized VetoableChangeSupport getVetoableChangeSupport()(Code)
This protected version is only available to concrete subclasses that expose bound property support. This method is synchronized to enable lazy instantiation, in the belief that is a bigger win to avoid allocating when there are no listeners than it is to introduce synchronization overhead on access.



hasSingleThreadedImpl
boolean hasSingleThreadedImpl()(Code)
Returns true if the implementation class for this ControlBean requires the framework to ensure thread-safety for it.



postInvoke
protected void postInvoke(Method m, Object[] args, Object retval, Throwable t, String[] interceptorNames, String pivotedInterceptor)(Code)
The postInvoke method is called after all operations on the control. In addition to providing the basic hook for logging, context initialization, resource management, and other common services, it also provides a hook for interceptors. During preInvoke, interceptors will be called in the order that they are in the list. During postInvoke, they will be called in the reverse order. Here is an example of the call sequence with I1, I2, and I3 being interceptors in the list: I1.preInvoke() -> I2.preInvoke() -> I3.preInvoke() -> invoke method | I1.postInvoke() <- I2.postInvoke() <- I3.postInvoke() <--- In the event that an interceptor in the list pivoted during preInvoke, the "pivotedInterceptor" parameter indicates the interceptor that had pivoted, and the interceptors succeeding it in the list will not be called during postInvoke.



postInvoke
protected void postInvoke(Method m, Object[] args, Object retval, Throwable t)(Code)
The postInvoke method is called after all operations on the control. It is the basic hook for logging, context initialization, resource management, and other common services.



preInvoke
protected void preInvoke(Method m, Object[] args, String[] interceptorNames) throws InterceptorPivotException(Code)
The preinvoke method is called before all operations on the control. In addition to providing a basic hook for logging, context initialization, resource management, and other common services, it also provides a hook for interceptors.



preInvoke
protected void preInvoke(Method m, Object[] args)(Code)
The preinvoke method is called before all operations on the control. It is the basic hook for logging, context initialization, resource management, and other common services



removeInvokeListener
void removeInvokeListener(InvokeListener invokeListener)(Code)
Deregisters an existing InvokeListener for this ControlBean.



setBeanContext
final public synchronized void setBeanContext(BeanContext bc)(Code)
Called by the BeanContextProxy (_cbc) whenever the _parent_ context containing this control bean is changed. This is the place to do any initialization (or reinitialization) that is dependent upon attributes of the container for the ControlBean. Note: this is called in the ControlBean ctor, when a parent context calls add() on the nascent bean.
Parameters:
  bc - the new parent context containing this control bean (not _cbc)



setControlProperty
protected void setControlProperty(PropertyKey key, Object o)(Code)
Sets a property on the ControlBean instance. All generated property setter methods will delegate down to this method.



setEventNotifier
protected void setEventNotifier(Class<T> eventSet, T notifier)(Code)
Sets the EventNotifier for this ControlBean



setLocalID
void setLocalID(String localID)(Code)
Set the local (parent-relative) ID for this ControlBean. It has package access because the local ID should only be set from within the associated context, and only when the bean is currently anonymous (hence the assertion below)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.