Java Doc for ContinuationsManagerImpl.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » flow » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.flow 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.components.flow.ContinuationsManagerImpl

ContinuationsManagerImpl
public class ContinuationsManagerImpl extends AbstractLogEnabled implements ContinuationsManager,Component,Configurable,ThreadSafe,Instrumentable,Serviceable,Contextualizable(Code)
The default implementation of ContinuationsManager .
There are two modes of work:
  • standard mode - continuations are stored in single holder. No security is applied to continuation lookup. Anyone can invoke a continuation only knowing the ID. Set "session-bound-continuations" configuration option to false to activate this mode.
  • secure mode - each session has it's own continuations holder. A continuation is only valid for the same session it was created for. Session invalidation causes all bound continuations to be invalidated as well. Use this setting for web applications. Set "session-bound-continuations" configuration option to true to activate this mode.

author:
   Ovidiu Predescu
author:
   Michael Melhem
since:
   March 19, 2002
See Also:   ContinuationsManager
version:
   CVS $Id: ContinuationsManagerImpl.java 433543 2006-08-22 06:22:54Z crossley $

Inner Class :protected class WebContinuationsHolder implements HttpSessionBindingListener
Inner Class :protected static class HolderAwareWebContinuation extends WebContinuation

Field Summary
final static  intCONTINUATION_ID_LENGTH
    
final static  StringEXPIRE_CONTINUATIONS
    
protected  booleanbindContinuationsToSession
    
protected  byte[]bytes
    
protected  Contextcontext
    
protected  ValueInstrumentcontinuationsCount
    
protected  intcontinuationsCounter
    
protected  CounterInstrumentcontinuationsCreated
    
protected  WebContinuationsHoldercontinuationsHolder
     Main continuations holder.
protected  CounterInstrumentcontinuationsInvalidated
    
protected  intdefaultTimeToLive
     How long does a continuation exist in memory since the last access? The time is in miliseconds, and the default is 1 hour.
protected  SortedSetexpirations
     Sorted set of WebContinuation instances, based on their expiration time.
protected  ValueInstrumentexpirationsSize
    
protected  Setforest
     Maintains the forest of WebContinuation trees.
protected  ValueInstrumentforestSize
    
protected  StringinstrumentableName
    
protected  booleanisContinuationSharingBugCompatible
    
protected  SecureRandomrandom
    
protected  ServiceManagerserviceManager
    

Constructor Summary
public  ContinuationsManagerImpl()
    

Method Summary
protected  void_invalidate(WebContinuationsHolder continuationsHolder, WebContinuation wk)
    
public  voidconfigure(Configuration config)
    
public  voidcontextualize(Context context)
    
public  WebContinuationcreateWebContinuation(Object kont, WebContinuation parent, int timeToLive, String interpreterId, ContinuationsDisposer disposer)
    
public  voiddisplayAllContinuations()
    
protected  voiddisplayExpireSet()
    
protected  voiddisposeContinuation(WebContinuationsHolder continuationsHolder, WebContinuation wk)
     Makes the continuation inaccessible for lookup, and triggers possible needed cleanup code through the ContinuationsDisposer interface.
protected  voidexpireContinuations()
     Remove all continuations which have already expired.
protected  WebContinuationgenerateContinuation(Object kont, WebContinuation parent, int ttl, String interpreterId, ContinuationsDisposer disposer)
     Create WebContinuation and generate unique identifier for it.
public  Instrumentable[]getChildInstrumentables()
    
public  StringgetInstrumentableName()
    
public  Instrument[]getInstruments()
    
public  ListgetWebContinuationsDataBeanList()
    
protected  voidhandleLeafContinuationExpiration(WebContinuation wk)
     When a new continuation is created in @link #createWebContinuation(Object, WebContinuation, int, String, ContinuationsDisposer), it is registered in the expiration set in order to be evaluated by the invalidation mechanism.
protected  voidhandleParentContinuationExpiration(WebContinuation parent)
     When a new continuation is created in @link #createWebContinuation(Object, WebContinuation, int, String, ContinuationsDisposer), its parent continuation is removed from the expiration set.
protected  voidinvalidateContinuations(WebContinuationsHolder continuationsHolder)
     Method used by WebContinuationsHolder to notify the continuations manager about session invalidation.
public  voidinvalidateWebContinuation(WebContinuation wk)
    
public  WebContinuationlookupWebContinuation(String id, String interpreterId)
    
public  WebContinuationsHolderlookupWebContinuationsHolder(boolean createNew)
     Lookup a proper web continuations holder.
protected  voidremoveContinuation(WebContinuationsHolder continuationsHolder, WebContinuation wk)
     Removes an expired leaf WebContinuation node from its continuation tree, and recursively removes its parent(s) if it they have expired and have no (other) children.
public  voidservice(ServiceManager manager)
    
public  voidsetInstrumentableName(String instrumentableName)
    

Field Detail
CONTINUATION_ID_LENGTH
final static int CONTINUATION_ID_LENGTH(Code)



EXPIRE_CONTINUATIONS
final static String EXPIRE_CONTINUATIONS(Code)



bindContinuationsToSession
protected boolean bindContinuationsToSession(Code)



bytes
protected byte[] bytes(Code)



context
protected Context context(Code)



continuationsCount
protected ValueInstrument continuationsCount(Code)



continuationsCounter
protected int continuationsCounter(Code)



continuationsCreated
protected CounterInstrument continuationsCreated(Code)



continuationsHolder
protected WebContinuationsHolder continuationsHolder(Code)
Main continuations holder. Used unless continuations are stored in user session.



continuationsInvalidated
protected CounterInstrument continuationsInvalidated(Code)



defaultTimeToLive
protected int defaultTimeToLive(Code)
How long does a continuation exist in memory since the last access? The time is in miliseconds, and the default is 1 hour.



expirations
protected SortedSet expirations(Code)
Sorted set of WebContinuation instances, based on their expiration time. This is used by the background thread to invalidate continuations.



expirationsSize
protected ValueInstrument expirationsSize(Code)



forest
protected Set forest(Code)
Maintains the forest of WebContinuation trees. This set is used only for debugging puroses by ContinuationsManagerImpl.displayAllContinuations() method.



forestSize
protected ValueInstrument forestSize(Code)



instrumentableName
protected String instrumentableName(Code)



isContinuationSharingBugCompatible
protected boolean isContinuationSharingBugCompatible(Code)



random
protected SecureRandom random(Code)
Random number generator used to create continuation ID



serviceManager
protected ServiceManager serviceManager(Code)




Constructor Detail
ContinuationsManagerImpl
public ContinuationsManagerImpl() throws Exception(Code)




Method Detail
_invalidate
protected void _invalidate(WebContinuationsHolder continuationsHolder, WebContinuation wk)(Code)



configure
public void configure(Configuration config)(Code)

See Also:   org.apache.avalon.framework.configuration.Configurable.configure(org.apache.avalon.framework.configuration.Configuration)



contextualize
public void contextualize(Context context) throws ContextException(Code)

See Also:   org.apache.avalon.framework.context.Contextualizable.contextualize(org.apache.avalon.framework.context.Context)



createWebContinuation
public WebContinuation createWebContinuation(Object kont, WebContinuation parent, int timeToLive, String interpreterId, ContinuationsDisposer disposer)(Code)

See Also:   org.apache.cocoon.components.flow.ContinuationsManager.createWebContinuation(java.lang.Objectorg.apache.cocoon.components.flow.WebContinuationintjava.lang.Stringorg.apache.cocoon.components.flow.ContinuationsDisposer)



displayAllContinuations
public void displayAllContinuations()(Code)
Dump to Log file all WebContinuations in the system



displayExpireSet
protected void displayExpireSet()(Code)
Dump to Log file the current contents of the expirations SortedSet



disposeContinuation
protected void disposeContinuation(WebContinuationsHolder continuationsHolder, WebContinuation wk)(Code)
Makes the continuation inaccessible for lookup, and triggers possible needed cleanup code through the ContinuationsDisposer interface.
Parameters:
  continuationsHolder -
Parameters:
  wk - the continuation to dispose.



expireContinuations
protected void expireContinuations()(Code)
Remove all continuations which have already expired.



generateContinuation
protected WebContinuation generateContinuation(Object kont, WebContinuation parent, int ttl, String interpreterId, ContinuationsDisposer disposer)(Code)
Create WebContinuation and generate unique identifier for it. The identifier is generated using a cryptographically strong algorithm to prevent people to generate their own identifiers.
Parameters:
  kont - an Object value representing continuation
Parameters:
  parent - value representing parent WebContinuation
Parameters:
  ttl - WebContinuation time to live
Parameters:
  interpreterId - id of interpreter invoking continuation creation
Parameters:
  disposer - ContinuationsDisposer instance to use forcleanup of the continuation. the generated WebContinuation with unique identifier



getChildInstrumentables
public Instrumentable[] getChildInstrumentables()(Code)

See Also:   org.apache.excalibur.instrument.Instrumentable.getChildInstrumentables



getInstrumentableName
public String getInstrumentableName()(Code)

See Also:   org.apache.excalibur.instrument.Instrumentable.getInstrumentableName



getInstruments
public Instrument[] getInstruments()(Code)

See Also:   org.apache.excalibur.instrument.Instrumentable.getInstruments



getWebContinuationsDataBeanList
public List getWebContinuationsDataBeanList()(Code)
Get a list of all web continuations (data only)



handleLeafContinuationExpiration
protected void handleLeafContinuationExpiration(WebContinuation wk)(Code)
When a new continuation is created in @link #createWebContinuation(Object, WebContinuation, int, String, ContinuationsDisposer), it is registered in the expiration set in order to be evaluated by the invalidation mechanism.



handleParentContinuationExpiration
protected void handleParentContinuationExpiration(WebContinuation parent)(Code)
When a new continuation is created in @link #createWebContinuation(Object, WebContinuation, int, String, ContinuationsDisposer), its parent continuation is removed from the expiration set. This way only leaf continuations are part of the expiration set.



invalidateContinuations
protected void invalidateContinuations(WebContinuationsHolder continuationsHolder)(Code)
Method used by WebContinuationsHolder to notify the continuations manager about session invalidation. Invalidates all continuations held by passed continuationsHolder.



invalidateWebContinuation
public void invalidateWebContinuation(WebContinuation wk)(Code)

See Also:   org.apache.cocoon.components.flow.ContinuationsManager.invalidateWebContinuation(org.apache.cocoon.components.flow.WebContinuation)



lookupWebContinuation
public WebContinuation lookupWebContinuation(String id, String interpreterId)(Code)

See Also:   org.apache.cocoon.components.flow.ContinuationsManager.lookupWebContinuation(java.lang.Stringjava.lang.String)



lookupWebContinuationsHolder
public WebContinuationsHolder lookupWebContinuationsHolder(boolean createNew)(Code)
Lookup a proper web continuations holder.
Parameters:
  createNew - should the manager create a continuations holder in sessionwhen none found?



removeContinuation
protected void removeContinuation(WebContinuationsHolder continuationsHolder, WebContinuation wk)(Code)
Removes an expired leaf WebContinuation node from its continuation tree, and recursively removes its parent(s) if it they have expired and have no (other) children.
Parameters:
  continuationsHolder -
Parameters:
  wk - WebContinuation node



service
public void service(ServiceManager manager) throws ServiceException(Code)

See Also:   org.apache.avalon.framework.service.Serviceable.service(org.apache.avalon.framework.service.ServiceManager)



setInstrumentableName
public void setInstrumentableName(String instrumentableName)(Code)

See Also:   org.apache.excalibur.instrument.Instrumentable.setInstrumentableName(java.lang.String)



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