Java Doc for WebContinuation.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.WebContinuation

WebContinuation
public class WebContinuation extends AbstractLogEnabled implements Comparable(Code)
Representation of continuations in a Web environment.

Because a user may click on the back button of the browser and restart a saved computation in a continuation, each WebContinuation becomes the parent of a subtree of continuations.

If there is no parent WebContinuation, the created continuation becomes the root of a tree of WebContinuations.
author:
   Ovidiu Predescu
since:
   March 19, 2002
version:
   CVS $Id: WebContinuation.java 433543 2006-08-22 06:22:54Z crossley $



Field Summary
protected  Listchildren
     The children continuations.
protected  Objectcontinuation
     The continuation this object represents.
protected  ContinuationsDisposerdisposer
     Holds the ContinuationsDisposer to call when this continuation gets invalidated.
protected  Stringid
     The continuation id used to represent this instance in Web pages.
protected  StringinterpreterId
    
protected  longlastAccessTime
     When was this continuation accessed last time.
protected  WebContinuationparentContinuation
     The parent WebContinuation from which processing last started.
protected  inttimeToLive
     Indicates how long does this continuation will live (in seconds).
protected  ObjectuserObject
     A user definable object.

Constructor Summary
 WebContinuation(String id, Object continuation, WebContinuation parentContinuation, int timeToLive, String interpreterId, ContinuationsDisposer disposer)
     Create a WebContinuation object.

Method Summary
public  intcompareTo(Object other)
     Compares the expiration time of this instance with that of the WebContinuation passed as argument.
public  voiddetachFromParent()
    
public  voiddisplay()
     Debugging method.
protected  Stringdisplay(int depth)
     Debugging method.

Displays the receiving instance as if it is at the indent depth in the tree of continuations.

public  voiddispose()
     Dispose this continuation.
public  booleandisposed()
    
public  booleanequals(Object another)
     True if the identifiers are the same, false otherwise.
public  ObjectgetAttribute(String name)
    
public  EnumerationgetAttributeNames()
     Enumerate the attributes of this continuation.
public  ListgetChildren()
     Return the children WebContinuation which were created as a result of resuming the processing from the current continuation.
public  ObjectgetContinuation()
     Return the continuation object.
public  WebContinuationgetContinuation(int level)
     Return the ancestor continuation situated levels above the current continuation.
 ContinuationsDisposergetDisposer()
     Obtains the ContinuationsDisposer to call when this continuation is invalidated.
public  StringgetId()
     Returns the string identifier of this WebContinuation.
public  StringgetInterpreterId()
     Returns the string identifier of the interpreter to which this WebContinuation is bound.
public  longgetLastAccessTime()
     Returns the last time this WebContinuation was accessed.
public  WebContinuationgetParentContinuation()
     Return the parent WebContinuation.
public  longgetTimeToLive()
     Returns the the timetolive for this WebContinuation.
public  ObjectgetUserObject()
     Obtains the user object associated with this instance.
public  booleanhasExpired()
    
public  inthashCode()
     Returns the hash code of the associated identifier.
public  booleaninterpreterMatches(String interpreterId)
    
public  voidremoveAttribute(String name)
    
public  voidsetAttribute(String name, Object value)
    
public  voidsetUserObject(Object obj)
     Sets the user object associated with this instance.
protected  voidupdateLastAccessTime()
    

Field Detail
children
protected List children(Code)
The children continuations. These are continuations created by resuming the processing from the point stored by continuation.



continuation
protected Object continuation(Code)
The continuation this object represents.



disposer
protected ContinuationsDisposer disposer(Code)
Holds the ContinuationsDisposer to call when this continuation gets invalidated.



id
protected String id(Code)
The continuation id used to represent this instance in Web pages.



interpreterId
protected String interpreterId(Code)
Interpreter id that this continuation is bound to



lastAccessTime
protected long lastAccessTime(Code)
When was this continuation accessed last time. Each time the continuation is accessed, this time is set to the time of the access.



parentContinuation
protected WebContinuation parentContinuation(Code)
The parent WebContinuation from which processing last started. If null, there is no parent continuation associated, and this is the first one to be created in a processing. In this case this WebContinuation instance becomes the root of the tree maintained by the ContinuationsManager.
See Also:   ContinuationsManager



timeToLive
protected int timeToLive(Code)
Indicates how long does this continuation will live (in seconds). The continuation will be removed once the current time is bigger than lastAccessTime + timeToLive.



userObject
protected Object userObject(Code)
A user definable object. This is present for convenience, to store any information associated with this WebContinuation a particular implementation might need.




Constructor Detail
WebContinuation
WebContinuation(String id, Object continuation, WebContinuation parentContinuation, int timeToLive, String interpreterId, ContinuationsDisposer disposer)(Code)
Create a WebContinuation object. Saves the object in the hash table of continuations maintained by manager (this is done as a side effect of obtaining and identifier from it).
Parameters:
  continuation - an Object value
Parameters:
  parentContinuation - a WebContinuation value
Parameters:
  timeToLive - time this continuation should live
Parameters:
  disposer - a ContinuationsDisposer to call when thiscontinuation gets invalidated.




Method Detail
compareTo
public int compareTo(Object other)(Code)
Compares the expiration time of this instance with that of the WebContinuation passed as argument.

Note: this class has a natural ordering that is inconsistent with equals.

.
Parameters:
  other - an Object value, which should be aWebContinuation instance an int value



detachFromParent
public void detachFromParent()(Code)



display
public void display()(Code)
Debugging method.

Assumes the receiving instance as the root of a tree and displays the tree of continuations.




display
protected String display(int depth)(Code)
Debugging method.

Displays the receiving instance as if it is at the indent depth in the tree of continuations. Each level is indented 2 spaces.
Parameters:
  depth - an int value




dispose
public void dispose()(Code)
Dispose this continuation. Should be called on invalidation.



disposed
public boolean disposed()(Code)
Return true if this continuation was disposed of



equals
public boolean equals(Object another)(Code)
True if the identifiers are the same, false otherwise.
Parameters:
  another - an Object value a boolean value



getAttribute
public Object getAttribute(String name)(Code)
Get an attribute of this continuation
Parameters:
  name - the attribute name.



getAttributeNames
public Enumeration getAttributeNames()(Code)
Enumerate the attributes of this continuation. an enumeration of strings



getChildren
public List getChildren()(Code)
Return the children WebContinuation which were created as a result of resuming the processing from the current continuation. a List value



getContinuation
public Object getContinuation()(Code)
Return the continuation object. an Object value



getContinuation
public WebContinuation getContinuation(int level)(Code)
Return the ancestor continuation situated levels above the current continuation. The current instance is considered to be at level 0. The parent continuation of the receiving instance at level 1, its parent is at level 2 relative to the receiving instance. If level is bigger than the depth of the tree, the root of the tree is returned.
Parameters:
  level - an int value a WebContinuation value



getDisposer
ContinuationsDisposer getDisposer()(Code)
Obtains the ContinuationsDisposer to call when this continuation is invalidated. a ContinuationsDisposer instance or null if there areno specific clean-up actions required.



getId
public String getId()(Code)
Returns the string identifier of this WebContinuation. a String value



getInterpreterId
public String getInterpreterId()(Code)
Returns the string identifier of the interpreter to which this WebContinuation is bound. a String value



getLastAccessTime
public long getLastAccessTime()(Code)
Returns the last time this WebContinuation was accessed. a long value



getParentContinuation
public WebContinuation getParentContinuation()(Code)
Return the parent WebContinuation. Equivalent with getContinuation(1). a WebContinuation value



getTimeToLive
public long getTimeToLive()(Code)
Returns the the timetolive for this WebContinuation. a long value



getUserObject
public Object getUserObject()(Code)
Obtains the user object associated with this instance. an Object value



hasExpired
public boolean hasExpired()(Code)
Determines whether this continuation has expired a boolean value



hashCode
public int hashCode()(Code)
Returns the hash code of the associated identifier. an int value



interpreterMatches
public boolean interpreterMatches(String interpreterId)(Code)



removeAttribute
public void removeAttribute(String name)(Code)
Remove an attribute of this continuation
Parameters:
  name - the attribute name



setAttribute
public void setAttribute(String name, Object value)(Code)
Set an attribute of this continuation
Parameters:
  name - the attribute name
Parameters:
  value - its value



setUserObject
public void setUserObject(Object obj)(Code)
Sets the user object associated with this instance.
Parameters:
  obj - an Object value



updateLastAccessTime
protected void updateLastAccessTime()(Code)
Update the continuation in the



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