Java Doc for RenderHub.java in  » J2EE » ICEfaces-1.6.1 » com » icesoft » faces » async » render » 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 » J2EE » ICEfaces 1.6.1 » com.icesoft.faces.async.render 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.icesoft.faces.async.render.RenderHub

RenderHub
public class RenderHub (Code)
The RenderHub is designed to handle all server-side rendering calls. Although it can be created programmatically, it is recommended that the application developer use a RenderManager instance for all rendering duties and for creating named GroupAsyncRenderer)s. The RenderManager createsand uses its own RenderHub for all rendering.

A single RenderHub should handle all server-side rendering duties in a thread-safe and efficient manner. It uses a specialized queue to hold Renderable instances and a thread pool to render each Renderable on the queue. The queue will only keep a single entry of any particular Renderable. Subsequent Renderables that are offered to the queue for rendering are discarded since any pending render call will update the client to the latest state. This coalescing of render calls makes it safer and more efficient for the application developer to add rendering into their application.
author:
   ICEsoft Technologies, Inc.
See Also:   RenderManager




Constructor Summary
public  RenderHub()
     Public constructor.

Method Summary
protected synchronized  voidcreateScheduledService()
    
public  voiddispose()
     Cleanly disposes of the RenderHub's resources.
public  intgetCorePoolSize()
     Get the starting size of the core thread pool.
public  longgetKeepAliveTime()
     Get the keep alive time of threads above the core number.
public  intgetMaxPoolSize()
     Get the maximum size of the core thread pool.
public  intgetRenderQueueCapacity()
     Get the capacity of the core render service queue.
public  intgetSchedulePoolSize()
     Get the thread pool size of the scheduled render service.
public  ScheduledThreadPoolExecutorgetScheduledService()
     As a secondary responsibility, the RenderHub also maintains a thread pool for render calls that should occur in the future.
public  voidrequestRender(Renderable renderable)
     The prime responsibility of the RenderHub is to perform a render call on the submitted Renderable.
public  voidsetCorePoolSize(int corePoolSize)
     Set the thread pool size of the core render service.
public  voidsetKeepAliveTime(long keepAliveTime)
     Set the amount of idle time to keep threads created above the core size.
public  voidsetMaxPoolSize(int maxPoolSize)
     Set the maximum thread pool size of the core render service.
public  voidsetRenderQueueCapacity(int renderQueueCapacity)
    
public  voidsetSchedulePoolSize(int schedulePoolSize)
     Set the thread pool size of the scheduled render service.


Constructor Detail
RenderHub
public RenderHub()(Code)
Public constructor. Although it possible for developers to construct and use their own RenderHub, it is highly recommended that a RenderManager be used. The RenderManager creates and uses it's own internal RenderHub.




Method Detail
createScheduledService
protected synchronized void createScheduledService()(Code)



dispose
public void dispose()(Code)
Cleanly disposes of the RenderHub's resources. Used by the RenderManager when the application shuts down.



getCorePoolSize
public int getCorePoolSize()(Code)
Get the starting size of the core thread pool. The starting size of the core thread pool.



getKeepAliveTime
public long getKeepAliveTime()(Code)
Get the keep alive time of threads above the core number. The number of threads that are created past the core number (up to the maximum number) are kept alive until they are idle for the keep alive time. The keep alive time for threads created past the core number.



getMaxPoolSize
public int getMaxPoolSize()(Code)
Get the maximum size of the core thread pool. The maximum size of the core thread pool.



getRenderQueueCapacity
public int getRenderQueueCapacity()(Code)
Get the capacity of the core render service queue. The capacity of the core render service queue.



getSchedulePoolSize
public int getSchedulePoolSize()(Code)
Get the thread pool size of the scheduled render service. the size of the schedule service thread pool



getScheduledService
public ScheduledThreadPoolExecutor getScheduledService()(Code)
As a secondary responsibility, the RenderHub also maintains a thread pool for render calls that should occur in the future. This service is used by renderers such as the IntervalRenderer and DelayRenderer to delay the eventual render calls. All the rendering is still handled by the RenderHubs core thread pool/queue. The scheduled service is used to delay when that occurs. Having this supplied by the RenderHub ensures that there is only one. A scheduling service.



requestRender
public void requestRender(Renderable renderable)(Code)
The prime responsibility of the RenderHub is to perform a render call on the submitted Renderable. Each call to this method is submitted and, if not already in the queue, placed on the queue to be rendered. The thread pool is created here if does not yet exist using whatever configuration values have been set.
Parameters:
  renderable - The Renderable instance to add to the rendering queue.



setCorePoolSize
public void setCorePoolSize(int corePoolSize)(Code)
Set the thread pool size of the core render service. The default is 10. This number will need to be adjusted based on the characteristics of the application. Note that increasing the number of threads past a certain number (based on OS, JVM, etc) can actually decrease performance as thread context switching becomes a burden.
Parameters:
  corePoolSize - The number of threads to dedicate to the scheduledservice thread pool.



setKeepAliveTime
public void setKeepAliveTime(long keepAliveTime)(Code)
Set the amount of idle time to keep threads created above the core size. The default is 300000 ms.
Parameters:
  keepAliveTime - The idle time in ms to keep additional threadsalive.



setMaxPoolSize
public void setMaxPoolSize(int maxPoolSize)(Code)
Set the maximum thread pool size of the core render service. The default is 15. This number will need to be adjusted based on the characteristics of the application. Note that increasing the number of threads past a certain number (based on OS, JVM, etc) can actually decrease performance as thread context switching becomes a burden.
Parameters:
  maxPoolSize - The maximum number of threads to dedicate to the coreservice thread pool.



setRenderQueueCapacity
public void setRenderQueueCapacity(int renderQueueCapacity)(Code)



setSchedulePoolSize
public void setSchedulePoolSize(int schedulePoolSize)(Code)
Set the thread pool size of the scheduled render service. The default is 5 and unless you have a lot of renderers that use the scheduling service, it should really be more than enough.
Parameters:
  schedulePoolSize - The number of threads to dedicate to thescheduled service thread pool.



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.