org.apache.cocoon.components.flow
Interface ContinuationsManager

All Known Implementing Classes:
ContinuationsManagerImpl

public interface ContinuationsManager

The interface of the Continuations manager. The continuation manager maintains a forest of WebContinuation trees. Each tree defines the flow of control for a user within the application. A WebContinuation is created for a continuation object from the scripting language used. A continuation object in the implementation of the scripting language is an opaque object here. It is only stored inside the WebContinuation, without being interpreted in any way.

Since:
March 19, 2002
Version:
CVS $Id: ContinuationsManager.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Ovidiu Predescu
See Also:
WebContinuation

Field Summary
static String ROLE
           
 
Method Summary
 WebContinuation createWebContinuation(Object kont, WebContinuation parentKont, int timeToLive, String interpreterId, ContinuationsDisposer disposer)
          Create a WebContinuation object given a native continuation object and its parent.
 void displayAllContinuations()
          Deprecated. Use getForest(). This method will be removed from the interface.
 Set getForest()
          Get a set of all web continuations.
 List getWebContinuationsDataBeanList()
          Deprecated. Use getForest(). This method will be removed.
 void invalidateWebContinuation(WebContinuation k)
          Invalidates a WebContinuation.
 WebContinuation lookupWebContinuation(String id, String interpreterId)
          Given a WebContinuation id, retrieve the associated WebContinuation object.
 

Field Detail

ROLE

static final String ROLE
Method Detail

createWebContinuation

WebContinuation createWebContinuation(Object kont,
                                      WebContinuation parentKont,
                                      int timeToLive,
                                      String interpreterId,
                                      ContinuationsDisposer disposer)
Create a WebContinuation object given a native continuation object and its parent. If the parent continuation is null, the WebContinuation returned becomes the root of a tree in the forest.

Parameters:
kont - an Object value
parentKont - a WebContinuation value
timeToLive - an int value indicating how long in seconds this continuation will live in the server if not accessed
interpreterId - id of interpreter invoking continuation creation
disposer - a ContinuationsDisposer instance to called when the continuation gets cleaned up.
Returns:
a WebContinuation value
See Also:
WebContinuation

invalidateWebContinuation

void invalidateWebContinuation(WebContinuation k)
Invalidates a WebContinuation. This effectively means that the continuation object associated with it will no longer be accessible from Web pages. Invalidating a WebContinuation invalidates all the WebContinuations which are children of it.

Parameters:
k - a WebContinuation value

lookupWebContinuation

WebContinuation lookupWebContinuation(String id,
                                      String interpreterId)
Given a WebContinuation id, retrieve the associated WebContinuation object.

Parameters:
id - a String value
interpreterId - Id of an interpreter that queries for the continuation
Returns:
a WebContinuation object, null if no such WebContinuation could be found. Also null if WebContinuation was found but interpreter id does not match the one that the continuation was initially created for.

displayAllContinuations

void displayAllContinuations()
Deprecated. Use getForest(). This method will be removed from the interface.

Prints debug information about all web continuations into the log file.


getWebContinuationsDataBeanList

List getWebContinuationsDataBeanList()
Deprecated. Use getForest(). This method will be removed.

Get a list of all continuations as WebContinuationDataBean objects.


getForest

Set getForest()
Get a set of all web continuations. The set itself will only contain the root continuations. Those will provide access to their children. Since it should not be possible to mess up the actual managed continuations the returned list will contain clones of them. The purpose of this method is clearly monitoring or for debugging the application. It has no direct relationship to functionality of the ContinuationsManager.



Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.