blob: 2686f56a236e37cb532a1a326293ce2c4a972883 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
<document>
<header>
<title>Advanced Control Flow</title>
<authors>
<person name="Ovidiu Predescu" email="ovidiu@apache.org"/>
<person name="Christopher Oliver" email="coliver@apache.org"/>
</authors>
</header>
<body>
<s1 title="Flowscript">
<p>Cocoon Flowscript is a JavaScript API to manage control flow based on an
<link href="http://cvs.cocoondev.org/cgi-bin/viewcvs.cgi/?cvsroot=rhino">extended</link>
version of the <link href="http://www.mozilla.org/rhino">Mozilla Rhino</link> JavaScript interpreter that supports continuations.</p>
</s1>
<anchor id="FOM"/><s1 title="Flow Object Model">
<p>Cocoon provides a set of system objects for use by Flowscripts. We call this set of objects the <em>Flow Object Model</em> (FOM).
The Flow Object Model consists of the following objects:</p>
<ul>
<li><link href="#cocoon">Cocoon</link></li>
<li><link href="#request">Request</link></li>
<li><link href="#response">Response</link></li>
<li><link href="#session">Session</link></li>
<li><link href="#context">Context</link></li>
<li><link href="#cookie">Cookie</link></li>
<li><link href="#log">Log</link></li>
<li><link href="#WebContinuation">WebContinuation</link></li>
</ul>
<s2 title = "Cocoon Object"><anchor id="cocoon"/>
<p>The <code>Cocoon</code> object represents the current Cocoon Sitemap. This is the entry point into the FOM. There is one instance of <code>Cocoon</code> which you may access in your scripts as the global variable <code>cocoon</code>, for example like this:</p>
<source>
var value = cocoon.request.getAttribute("blah");
</source>
<p>
The <code>Cocoon</code> object supports the following properties and functions:
</p>
<s3 title="request">
<p>The current Cocoon request:</p>
<p>
<em>Property</em> [<link href="#request">Request</link>] <code>request</code>
</p>
</s3>
<s3 title="response">
<p>The current Cocoon response:</p>
<p>
<em>Property</em> [<link href="#response">Response</link>] <code>response</code>
</p>
</s3>
<s3 title="session">
<p>The current Cocoon session:</p>
<p>
<em>Property</em> [<link href="#session">Session</link>] <code>session</code>
</p>
</s3>
<s3 title="context">
<p>The current Cocoon application context:</p>
<p>
<em>Property</em> [<link href="#context">Context</link>] <code>context</code>
</p>
</s3>
<s3 title="log">
<p>A reference to the current logger:</p>
<p>
<em>Property</em> [<link href="#log">Log</link>] <code>log</code>
</p>
</s3>
<s3 title="parameters">
<p>Any parameters passed to the script by the Cocoon Sitemap</p>
<p>
<em>Property</em> <code>[Object] parameters</code>
</p>
</s3>
<s3 title = "sendPage"><anchor id="sendPage"/>
<p>
<em>Function</em> <code>sendPage([String] uri, [Object] bean)</code>
</p>
<p>
Passes control to the Cocoon sitemap to generate the output page.
</p>
<p>
<code>uri</code> is the sitemap URI of the page to be sent back to the client. If the URI starts with a slash, it is resolved starting at the root sitemap, otherwise it is resolved relative to the current sitemap. The URI should not contain a scheme (such as cocoon:).
</p>
<p>
<code>bean</code> is a context object which can be accessed inside this page to extract
various values and place them in the generated page.
</p>
</s3>
<s3 title = "sendPageAndWait"><anchor id="sendPageAndWait"/>
<p>
<em>Function</em> <code>[WebContinuation] sendPageAndWait([String] uri, [Object] bean, [Function] postPipelineCode, [Number] timeToLive)</code>
</p>
<p>
Passes control to the Cocoon sitemap to generate the output page.
</p>
<p>The flow script is suspended after the page is generated and the whole execution stack
saved in the WebContinuation object returned from this function. </p>
<p><code>uri</code> is the relative URL of the page to be sent back to the client. If the URI starts with a slash, it is resolved starting at the root sitemap, otherwise it is resolved relative to the current sitemap. The URI should not contain a scheme (such as cocoon:).</p>
<p>
<code>bean</code> is a context object which can be accessed inside this page to extract
various values and place them in the generated page.</p>
<p>If provided, the <code>postPipelineCode</code> function will be executed after pipeline processing is complete but before the script is suspended. You can use this to release resources that are needed during the pipeline processing but should not become part of the continuation. For example:</p>
<source>
function processPage() {
var id = ...
var bizData = ...
var uri = ...
var comp = cocoon.getComponent(id);
// use comp
...
cocoon.sendPageAndWait(uri, bizData, function() {
cocoon.releaseComponent(comp);
comp = null;
});
}
</source>
<p><code>timeToLive</code> is the time to live in milliseconds for the continuation created.</p>
<p>The return value is the <link href="#WebContinuation">continuation</link> object.</p>
</s3>
<s3 title = "sendStatus"><anchor id="sendStatus"/>
<p>
<em>Function</em> <code>sendStatus([Number] sc)</code>
</p>
<p>
Sends an empty response with the provided HTTP status code.
</p>
</s3>
<s3 title = "createPageLocal"><anchor id="createPageLocal"/>
<p>
<em>Function</em> <code>[Object] createPageLocal()</code>
</p>
<p>
Creates a <em>Page Local</em> object. The returned object behaves like a normal JavaScript object, but restores the property values it had when <link href="#sendPageAndWait">sendPageAndWait</link> was originally called, each time a page is resubmitted (e.g. after hitting the back button). Such objects can be used to associate state with one particular page sent to the browser.
</p>
</s3>
<s3 title="processPipelineTo">
<p>
<em>Function</em> <code>processPipelineTo([String] uri, [Object] bizData, [java.io.OutputStream] stream)</code></p>
<p>
Call the Cocoon sitemap for the given URI, sending the output of the
eventually matched pipeline to the specified <code>OutputStream</code>.</p>
<p><code>uri</code> is the URI for which the request should be generated. If the URI starts with a slash, it is resolved starting at the root sitemap, otherwise it is resolved relative to the current sitemap. The URI should not contain a scheme (such as cocoon:).</p>
<p><code>bizData</code> is the business data object
to be made available to the forwarded pipeline</p>
<p><code>stream</code> is an <code>OutputStream</code> where the output should be written to.</p>
</s3>
<s3 title="redirectTo">
<p>
<em>Function</em> <code>redirectTo([String] uri)</code></p>
<p>
Send a client-side redirect to the browser. The <code>uri</code> argument is the URI to which the browser should be redirected.
</p>
</s3>
<s3 title = "createWebContinuation"><anchor id="createWebContinuation"/>
<p>
<em>Function</em> <code>[WebContinuation] createWebContinuation()</code>
</p>
<p>
Creates a new "bookmark" <link href="#WebContinuation">WebContinuation</link> object. When invoked it will cause the script to resume right after the call. By calling this function prior to sendPageAndWait() you can be create a "bookmark" which will cause the page to be redisplayed in the browser. Note: the WebContinuation associated with sendPageAndWait() doesn't do this. Rather it resumes execution after the the page is submitted.
</p>
<p>For example:</p>
<source>
function processPage() {
var bkm = cocoon.createWebContinuation();
var biz = getBizData();
cocoon.sendPageAndWait("uri",
{bookmark: bkm, biz: biz},
function() { releaseData(biz); });
}
</source>
<p></p>
</s3>
<s3 title="load">
<p><em>Function</em> <code>load([String] uri)</code></p>
<p>
Load the JavaScript script specified by <code>uri</code>. The Cocoon
source resolver is used to resolve <code>uri</code>.
</p>
</s3>
<s3 title="getComponent">
<p><em>Function</em> <code>Object getComponent([String] id)</code></p>
<p>
Access an Avalon component.
</p>
</s3>
<s3 title="releaseComponent">
<p><em>Function</em> <code>releaseComponent([Object] component)</code></p>
<p>
Release a pooled Avalon component.
</p>
</s3>
<s3 title="createObject">
<p><em>Function</em> <code>createObject([JavaClass] componentClass)</code></p>
<p>
Create and setup an object so that it can access the information provided to regular components. This is done by calling the various Avalon lifecycle interfaces implemented by the object.
</p>
</s3>
<s3 title="disposeObject">
<p><em>Function</em> <code>disposeObject([Object] object)</code></p>
<p>
Dispose an object that has been created using <code>createObject</code>.
</p>
</s3>
</s2>
<s2 title="Request Object"><anchor id="request"/>
<p>The <code>Request</code> object represents the current Cocoon request. It provides the following functions and properties:</p>
<s3 title="get">
<p><em>Function</em> <code>[String] get([String] name)</code></p>
<p>
Get the request parameter or attribute with the specified <code>name</code>.
</p>
</s3>
<s3 title="getAttribute">
<p><em>Function</em> <code>[String] getAttribute([String] name)</code></p>
<p>
Get the request attribute with the specified <code>name</code>.
</p>
</s3>
<s3 title="getAttributeNames">
<p><em>Function</em> <code>[java.util.Enumeration] getAttributeNames()</code></p>
<p>
Get an enumeration of request attribute names.
</p>
</s3>
<s3 title="setAttribute">
<p><em>Function</em> <code>setAttribute([String] name, [Object] value)</code></p>
<p>
Set the value of a request attribute.
</p>
</s3>
<s3 title="removeAttribute">
<p><em>Function</em> <code>removeAttribute([String] name)</code></p>
<p>
Remove the attribute with the name <code>name</code> from this request.
</p>
</s3>
<s3 title="getCharacterEncoding">
<p><em>Function</em> <code>[String]getCharacterEncoding()</code></p>
<p>
Return the character encoding used by this request.
</p>
</s3>
<s3 title="setCharacterEncoding">
<p><em>Function</em> <code>setCharacterEncoding([String] value)</code></p>
<p>
Set the character encoding used by this request.
</p>
</s3>
<s3 title="getContentLength">
<p><em>Function</em> <code>[Number] getContentLength()</code></p>
<p>
Get the content-length of this request
</p>
</s3>
<s3 title="getContentType">
<p><em>Function</em> <code>[String] getContentType()</code></p>
<p>
Get the content-type of this request
</p>
</s3>
<s3 title="getParameter">
<p><em>Function</em> <code>[String] getParameter([String] name)</code></p>
<p>
Get the request parameter with the specified <code>name</code>.
</p>
</s3>
<s3 title="getParameterValues">
<p><em>Function</em> <code>[Array] getParameterValues([String] name)</code></p>
<p>
Get an array of request parameters with the specified <code>name</code>.
</p>
</s3>
<s3 title="getParameterNames">
<p><em>Function</em> <code>[java.util.Enumeration] getParameterNames()</code></p>
<p>
Get an enumeration of the parameter names in this request.
</p>
</s3>
<s3 title="getAuthType">
<p><em>Function</em> <code>[String] getAuthType()</code></p>
<p>
Get the authorization type used in this request.
</p>
</s3>
<s3 title="getProtocol">
<p><em>Function</em> <code>[String] getProtocol()</code></p>
<p>
Get the protocol used in this request.
</p>
</s3>
<s3 title="getScheme">
<p><em>Function</em> <code>[String] getScheme()</code></p>
<p>
Get the scheme used in this request.
</p>
</s3>
<s3 title="getMethod">
<p><em>Function</em> <code>[String] getMethod()</code></p>
<p>
Get the method used in this request.
</p>
</s3>
<s3 title="getServerName">
<p><em>Function</em> <code>[String] getServerName()</code></p>
<p>
Get the server name of this request.
</p>
</s3>
<s3 title="getServerPort">
<p><em>Function</em> <code>[Number] getServerPort()</code></p>
<p>
Get the server port of this request.
</p>
</s3>
<s3 title="getRemoteAddr">
<p><em>Function</em> <code>[String] getRemoteAddr()</code></p>
<p>
Get the remote address of this request.
</p>
</s3>
<s3 title="isSecure">
<p><em>Function</em> <code>[Boolean] isSecure()</code></p>
<p>
Get the <code>secure</code> property of this request.
</p>
</s3>
<s3 title="getLocale">
<p><em>Function</em> <code>[String] getLocale()</code></p>
<p>
Get the locale of this request.
</p>
</s3>
<s3 title="getLocales">
<p><em>Function</em> <code>[Array [String]] getLocales()</code></p>
<p>
Get the locales of this request.
</p>
</s3>
<s3 title="getCookies">
<p><em>Function</em> <code>[Array [Cookie]] getCookies()</code></p>
<p>
Get the cookies associated with this request.
</p>
</s3>
<s3 title="getHeader">
<p><em>Function</em> <code>[String] getHeader([String] name)</code></p>
<p>
Get the header with <code>name</code> from this request.
</p>
</s3>
<s3 title="getHeaders">
<p><em>Function</em> <code>[Array] getHeaders()</code></p>
<p>
Get the headers associated with this request.
</p>
</s3>
<s3 title="getHeaderNames">
<p><em>Function</em> <code>[java.util.Enumeration] getHeaderNames()</code></p>
<p>
Get an enumeration of header names from this request.
</p>
</s3>
<s3 title="getRemoteUser">
<p><em>Function</em> <code>[String] getRemoteUser()</code></p>
<p>
Get the remote user associated with this request.
</p>
</s3>
<s3 title="getUserPrincipal">
<p><em>Function</em> <code>[String] getUserPrincipal()</code></p>
<p>
Get the user principal associated with this request.
</p>
</s3>
<s3 title="isUserInRole">
<p><em>Function</em> <code>[Boolean] isUserInRole([String] role)</code></p>
<p>
Returns whether the user associated with this request is in the specified <code>role</code>.
</p>
</s3>
<s3 title="Properties">
<p>
<code>Request</code> properties map to request parameters, i.e. <code>request.blah</code> is equivalent to <code>request.getParameter("blah")</code>.
</p>
</s3>
</s2>
<s2 title="Response Object"><anchor id="response"/>
<p>The <code>Response</code> object represents the Cocoon response associated with the current request.</p>
<p>
The response object contains hooks only to the cookies and to the response headers. Everything else will be controlled by the rest of the cocoon pipeline machinery (like output encoding, for example, which should *NOT* be determined by the flow).
</p>
<p>It provides the following functions and properties:</p>
<s3 title="createCookie">
<p><em>Function</em> <code>[Cookie] createCookie([String] name, [String] value)</code></p>
<p>
Creates a new <link href="#cookie">Cookie</link>.
</p>
</s3>
<s3 title="addCookie">
<p><em>Function</em> <code>addCookie([Cookie] cookie)</code></p>
<p>
Adds <code>cookie</code> to the current response.
</p>
</s3>
<s3 title="containsHeader">
<p><em>Function</em> <code>[Boolean] containsHeader([String] name)</code></p>
<p>
Returns whether the current response contains a header with the specified <code>name</code>.
</p>
</s3>
<s3 title="setHeader">
<p><em>Function</em> <code>setHeader([String] name, [String] value)</code></p>
<p>
Replaces the value of the header with <code>name</code> with <code>value</code>.
</p>
</s3>
<s3 title="addHeader">
<p><em>Function</em> <code>addHeader([String] name, [String] value)</code></p>
<p>
Creates a new header in the current response with the specified <code>name</code> and <code>value</code>.
</p>
</s3>
<s3 title="setStatus">
<p><em>Function</em> <code>setStatus([Number] sc)</code></p>
<p>
Sets the status code for this response.
</p>
</s3>
</s2>
<s2 title="Session Object"><anchor id="session"/>
<p>The <code>Session</code> object represents the user session associated with the current Cocoon request.</p>
<p>It provides the following functions and properties:</p>
<s3 title="getAttribute">
<p><em>Function</em> <code>[Object] getAttribute([String] name)</code></p>
<p>
Get the value of the session attribute with the specified <code>name</code>.
</p>
</s3>
<s3 title="setAttribute">
<p><em>Function</em> <code>setAttribute([String] name, [Object] value)</code></p>
<p>
Set the value of the session attribute with the specified <code>name</code> to <code>value</code>.
</p>
</s3>
<s3 title="removeAttribute">
<p><em>Function</em> <code>removeAttribute([String] name)</code></p>
<p>
Remove the session attribute with the specified <code>name</code>.
</p>
</s3>
<s3 title="invalidate">
<p><em>Function</em> <code>invalidate()</code></p>
<p>
Invalidate this session, releasing all resources associated with it.
</p>
</s3>
<s3 title="isNew">
<p><em>Function</em> <code>[Boolean] isNew()</code></p>
<p>
Returns <code>true</code> if the client does not yet know about the
session or if the client chooses not to join the session. For
example, if the server used only cookie-based sessions, and
the client had disabled the use of cookies, then a session would
be new on each request.
</p>
</s3>
<s3 title="getId">
<p><em>Function</em> <code>[String] getId()</code></p>
<p>
Returns the unique id associated with this session.
</p>
</s3>
<s3 title="getCreationTime">
<p><em>Function</em> <code>[Number] getCreationTime()</code></p>
<p>
Returns the time when this session was created, measured
in milliseconds since midnight January 1, 1970 GMT.
</p>
</s3>
<s3 title="getLastAccessedTime">
<p><em>Function</em> <code>[Number] getLastAccessedTime()</code></p>
<p>
Returns the last time the client sent a request associated with
this session, as the number of milliseconds since midnight
January 1, 1970 GMT.
</p>
</s3>
<s3 title="setMaxInactiveInterval">
<p><em>Function</em> <code>setMaxInactiveInterval([Number] interval)</code></p>
<p>
Specifies the time, in seconds, between client requests before the
contextcontainer will invalidate this session. A negative time
indicates the session should never timeout.
</p>
</s3>
<s3 title="getMaxInactiveInterval">
<p><em>Function</em> <code>[Number] getMaxInactiveInterval()</code></p>
<p>
Returns the maximum time interval, in seconds, that
the context container will keep this session open between
client accesses. After this interval, the context container
will invalidate the session. The maximum time interval can be set
with the <code>setMaxInactiveInterval</code> method.
A negative time indicates the session should never timeout.
</p>
</s3>
<s3 title="Properties">
<p>
<code>Session</code> properties map to session attributes, i.e. <code>session.blah</code> is equivalent to <code>session.getAttribute("blah")</code>.</p>
</s3>
</s2>
<s2 title="Context Object"><anchor id="context"/>
<p>The <code>Context</code> object represents the client context associated with the current Cocoon request.</p>
<p>It provides the following functions and properties:</p>
<s3 title="getAttribute">
<p><em>Function</em> <code>[Object] getAttribute([String] name)</code></p>
<p>
Get the value of the context attribute with the specified <code>name</code>.
</p>
</s3>
<s3 title="setAttribute">
<p><em>Function</em> <code>setAttribute([String] name, [Object] value)</code></p>
<p>
Set the value of the context attribute with the specified <code>name</code> to <code>value</code>.
</p>
</s3>
<s3 title="removeAttribute">
<p><em>Function</em> <code>removeAttribute([String] name)</code></p>
<p>
Remove the context attribute with the specified <code>name</code>.
</p>
</s3>
<s3 title="getInitParameter">
<p><em>Function</em> <code>getInitParameter([String] name)</code></p>
<p>
Get the value of the context initialization parameter with the specified <code>name</code>.
</p>
</s3>
<s3 title="Properties">
<p>
<code>Context</code> properties map to context attributes, i.e. <code>context.blah</code> is equivalent to <code>context.getAttribute("blah")</code>.
</p>
</s3>
</s2>
<s2 title="Cookie Object"><anchor id="cookie"/>
<p><code>Cookie</code> provides the following functions and properties:</p>
<s3 title="getName">
<p><em>Function</em> <code>[String] getName()</code></p>
<p>
Get the name of this cookie.
</p>
</s3>
<s3 title="getVersion">
<p><em>Function</em> <code>[String] getVersion()</code></p>
<p>
Get the version of this cookie.
</p>
</s3>
<s3 title="setVersion">
<p><em>Function</em> <code>setVersion([String] version)</code></p>
<p>
Set the version of this cookie.
</p>
</s3>
<s3 title="getValue">
<p><em>Function</em> <code>[String] getValue()</code></p>
<p>
Get the value of this cookie.
</p>
</s3>
<s3 title="setValue">
<p><em>Function</em> <code>setValue([String] value)</code></p>
<p>
Set the value of this cookie.
</p>
</s3>
<s3 title="getComment">
<p><em>Function</em> <code>[String] getComment()</code></p>
<p>
Get the comment of this cookie.
</p>
</s3>
<s3 title="setComment">
<p><em>Function</em> <code>setComment([String] comment)</code></p>
<p>
Set the comment of this cookie.
</p>
</s3>
<s3 title="getDomain">
<p><em>Function</em> <code>[String] getDomain()</code></p>
<p>
Get the domain of this cookie.
</p>
</s3>
<s3 title="setDomain">
<p><em>Function</em> <code>setDomain([String] domain)</code></p>
<p>
Set the domain of this cookie.
</p>
</s3>
<s3 title="getPath">
<p><em>Function</em> <code>[String] getPath()</code></p>
<p>
Get the path of this cookie.
</p>
</s3>
<s3 title="setPath">
<p><em>Function</em> <code>setPath([String] path)</code></p>
<p>
Set the path of this cookie.
</p>
</s3>
<s3 title="getSecure">
<p><em>Function</em> <code>[Boolean] getSecure()</code></p>
<p>
Get the secure property of this cookie.
</p>
</s3>
<s3 title="setSecure">
<p><em>Function</em> <code>setSecure([Boolean] value)</code></p>
<p>
Set the secure property of this cookie.
</p>
</s3>
</s2>
<s2 title="Log Object"><anchor id="log"/>
<p> The <code>Log</code> object provides an interface to the Cocoon logging system.
</p>
<p>
It supports the following functions:
</p>
<s3 title="error">
<p>
<em>Function</em> <code>error([String] message, [java.lang.Throwable] exception)</code>
</p>
<p>
Log an error message. If <code>exception</code> is provided its stack trace will also be logged.
</p>
</s3>
<s3 title="debug">
<p>
<em>Function</em> <code>debug([String] message, [java.lang.Throwable] exception)</code>
</p>
<p>
Log a debug message. If <code>exception</code> is provided its stack trace will also be logged.
</p>
</s3>
<s3 title="warn">
<p>
<em>Function</em> <code>warn([String] message, [java.lang.Throwable] exception)</code>
</p>
<p>
Log a warning message. If <code>exception</code> is provided its stack trace will also be logged.
</p>
</s3>
<s3 title="info">
<p>
<em>Function</em> <code>info([String] message, [java.lang.Throwable] exception)</code>
</p>
<p>
Log an information message. If <code>exception</code> is provided its stack trace will also be logged.
</p>
</s3>
<s3 title="isErrorEnabled">
<p>
<em>Function</em> <code>[Boolean] isErrorEnabled()</code>
</p>
<p>
Returns whether error message logging is enabled.
</p>
</s3>
<s3 title="isDebugEnabled">
<p>
<em>Function</em> <code>[Boolean] isDebugEnabled()</code>
</p>
<p>
Returns whether debug message logging is enabled.
</p>
</s3>
<s3 title="isWarnEnabled">
<p>
<em>Function</em> <code>[Boolean] isWarnEnabled()</code>
</p>
<p>
Returns whether warning message logging is enabled.
</p>
</s3>
<s3 title="isInfoEnabled">
<p>
<em>Function</em> <code>[Boolean] isInfoEnabled()</code>
</p>
<p>
Returns whether information message logging is enabled.
</p>
</s3>
</s2>
<s2 title="WebContinuation"><anchor id="WebContinuation"/>
<p>A <code>WebContinuation</code> represents a continuation of a Flowscript. Because a user may click on the back button in the browser and restart a saved computation in a continuation, each <code>WebContinuation</code> becomes the parent of a subtree of continuations.
</p>
<p>
If there is no parent <code>WebContinuation</code>, the created continuation becomes the root of a tree of <code>WebContinuation</code>s.
</p>
<p>
<code>WebContinuation</code> objects support the following functions and properties:
</p>
<s3 title="id">
<p><em>Property</em> <code>[String] id</code></p>
<p>Returns the unique string identifier of this Web Continuation.</p>
</s3>
<s3 title="continuation">
<p><em>Property</em> <code>[Continuation] continuation</code></p>
<p>Returns the JavaScript continuation associated with this Web Continuation.</p>
</s3>
<s3 title="previousBookmark">
<p><em>Property</em> <code>[WebContinuation] previousBookmark</code></p>
<p>Returns a reference to the first bookmark continuation among the pages preceding the one associated with this object, or null if no such bookmark continuation exists. The returned object is the continuation you would invoke to implement a "Back" button.</p>
</s3>
<s3 title="isBookmark">
<p><em>Function</em> <code>[Boolean] isBookmark()</code></p>
<p>Returns <code>true</code> if this continuation was <em>not</em> created by <link href="#sendPageAndWait">sendPageAndWait</link>.</p>
</s3>
<s3 title="getParent">
<p>
<em>Function</em> <code>[WebContinuation] getParent()</code>
</p>
<p>
Get the parent continuation of this continuation.
</p>
</s3>
<s3 title="getChildren">
<p>
<em>Function</em> <code>[Array [WebContinuation]] getChildren()</code>
</p>
<p>
Get the child continuations of this continuation.
</p>
</s3>
<s3 title="invalidate">
<p>
<em>Function</em> <code>invalidate()</code>
</p>
<p>
Invalidates a <code>WebContinuation</code>. This effectively
means that the continuation object associated with it will no
longer be accessible from Web pages. Invalidating a
<code>WebContinuation</code> invalidates all the
<code>WebContinuation</code>s which are children of it.
</p>
</s3>
</s2>
</s1>
</body>
</document>