Java Doc for EventThreadResume.java in  » Ajax » zk » org » zkoss » zk » ui » event » 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 » Ajax » zk » org.zkoss.zk.ui.event 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.zkoss.zk.ui.event.EventThreadResume

All known Subclasses:   org.zkoss.zkplus.hibernate.HibernateSessionContextListener,  org.zkoss.zkplus.util.ThreadLocalListener,  org.zkoss.zkplus.spring.SpringTransactionSynchronizationListener,  org.zkoss.zkplus.acegi.AcegiSecurityContextListener,
EventThreadResume
public interface EventThreadResume (Code)
Used to listen after the event processing thread is resumed.

How this interface is used.

  1. First, you specify a class that implements this interface in WEB-INF/zk.xml as a listener.
  2. Then, when a suspended event thread is being resumed, an instance of the specified class is constructed and EventThreadResume.beforeResume is called first in the main thread (i.e., the servlet thread), right before resuming. And then, EventThreadResume.afterResume is invoked in the event processing thread, after the thread is resumed.

In addition to resuming normally, a suspended event thread might be aborted (usually caused by detroying the desktop owning the event thread). In this case, EventThreadResume.abortResume is called instead of EventThreadResume.beforeResume and EventThreadResume.afterResume .
author:
   tomyeh





Method Summary
public  voidabortResume(Component comp, Event evt)
     Called when the suspended event thread is aborted.
public  voidafterResume(Component comp, Event evt)
     Called after the suspended event thread is resumed.
public  voidbeforeResume(Component comp, Event evt)
     Called just before the suspended event thread is resumed.



Method Detail
abortResume
public void abortResume(Component comp, Event evt) throws Exception(Code)
Called when the suspended event thread is aborted. It is called in the main thread (i.e., the servlet thread).

If a suspended event thread is resumed normally, EventThreadResume.beforeResume and EventThreadResume.afterResume are called. On the other hand, if it is aborted (usually caused by destroying the desktop that owns this thread), EventThreadResume.abortResume is called instead.

Note: if the suspended thread is aborted, none of EventThreadResume.beforeResume , EventThreadResume.afterResume , EventThreadCleanup.cleanup , and EventThreadCleanup.complete will be called. Thus, you have to do necessary cleanups in this method.




afterResume
public void afterResume(Component comp, Event evt) throws Exception(Code)
Called after the suspended event thread is resumed. Unlike EventThreadResume.beforeResume , it executes in the event processing thread that is resumed.

If this method throws an exception, it will abort the execution and shows an error message to the end user (unless it is cleaned up by org.zkoss.zk.ui.event.EventThreadCleanup.cleanup ).




beforeResume
public void beforeResume(Component comp, Event evt) throws Exception(Code)
Called just before the suspended event thread is resumed. Unlike EventThreadResume.afterResume , it executes in the main thread that resumes the suspended event processing thread.

If this method throws an exception, it will abort the execution and shows an error message to the end user. Note: EventThreadCleanup.cleanup won't be called if an exception is thrown in this method, since it executes in the main thread.




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