<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>flumotion.component.misc.httpserver.httpserver.CancellableRequest</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <th class="navbar" width="100%"></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> Package flumotion :: <a href="flumotion.component-module.html">Package component</a> :: <a href="flumotion.component.misc-module.html">Package misc</a> :: <a href="flumotion.component.misc.httpserver-module.html">Package httpserver</a> :: <a href="flumotion.component.misc.httpserver.httpserver-module.html">Module httpserver</a> :: Class CancellableRequest </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" onclick="toggle_private();">hide private</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class CancellableRequest</h1><p class="nomargin-top"><span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest">source code</a></span></p> <pre class="base-tree"> twisted.spread.jelly.Jellyable --+ | twisted.spread.flavors.Serializable --+ | twisted.spread.flavors.Copyable --+ | <a href="twisted.web.http.Request-class.html">twisted.web.http.Request</a> --+ | twisted.persisted.styles.Versioned --+ | | | twisted.python.components.Componentized --+ | twisted.web.server.Request --+ | <strong class="uidshort">CancellableRequest</strong> </pre> <hr /> <!-- ==================== INSTANCE METHODS ==================== --> <a name="section-InstanceMethods"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Instance Methods</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-InstanceMethods" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.component.misc.httpserver.httpserver.CancellableRequest-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">channel</span>, <span class="summary-sig-arg">queued</span>)</span></td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.__init__">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="setResponseRange"></a><span class="summary-sig-name">setResponseRange</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">first</span>, <span class="summary-sig-arg">last</span>, <span class="summary-sig-arg">size</span>)</span></td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.setResponseRange">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.component.misc.httpserver.httpserver.CancellableRequest-class.html#write" class="summary-sig-name">write</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">data</span>)</span><br /> Write some data as a result of an HTTP request.</td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.write">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.component.misc.httpserver.httpserver.CancellableRequest-class.html#finish" class="summary-sig-name">finish</a>(<span class="summary-sig-arg">self</span>)</span><br /> We are finished writing data.</td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.finish">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="flumotion.component.misc.httpserver.httpserver.CancellableRequest-class.html#connectionLost" class="summary-sig-name">connectionLost</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">reason</span>)</span><br /> connection was lost</td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.connectionLost">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="requestCompleted"></a><span class="summary-sig-name">requestCompleted</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">fd</span>)</span></td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.requestCompleted">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="getLogFields"></a><span class="summary-sig-name">getLogFields</span>(<span class="summary-sig-arg">self</span>)</span></td> <td align="right" valign="top"> <span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.getLogFields">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.web.server.Request</code></b>: <code>URLPath</code>, <code>childLink</code>, <code>getRootURL</code>, <code>getSession</code>, <code>getStateToCopyFor</code>, <code>notifyFinish</code>, <code>prePathURL</code>, <code>process</code>, <code>processingFailed</code>, <code>rememberRootURL</code>, <code>render</code>, <code>sibLink</code>, <code>view_addCookie</code>, <code>view_finish</code>, <code>view_registerProducer</code>, <code>view_setETag</code>, <code>view_setHeader</code>, <code>view_setLastModified</code>, <code>view_setResponseCode</code>, <code>view_unregisterProducer</code>, <code>view_write</code> </p> <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.web.server.Request</code></b> (private): <code>_prePathURL</code> </p></div> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.spread.flavors.Copyable</code></b>: <code>__provides__</code>, <code>getStateToCopy</code>, <code>getTypeToCopy</code>, <code>getTypeToCopyFor</code>, <code>jellyFor</code> </p> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.spread.flavors.Serializable</code></b>: <code>processUniqueID</code> </p> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.spread.jelly.Jellyable</code></b>: <code>__providedBy__</code>, <code>getStateFor</code> </p> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="twisted.web.http.Request-class.html">twisted.web.http.Request</a></code></b>: <code><a href="twisted.web.http.Request-class.html#__repr__">__repr__</a></code>, <code><a href="twisted.web.http.Request-class.html#__setattr__">__setattr__</a></code>, <code><a href="twisted.web.http.Request-class.html#addCookie">addCookie</a></code>, <code><a href="twisted.web.http.Request-class.html#getAllHeaders">getAllHeaders</a></code>, <code><a href="twisted.web.http.Request-class.html#getClient">getClient</a></code>, <code><a href="twisted.web.http.Request-class.html#getClientIP">getClientIP</a></code>, <code><a href="twisted.web.http.Request-class.html#getCookie">getCookie</a></code>, <code><a href="twisted.web.http.Request-class.html#getHeader">getHeader</a></code>, <code><a href="twisted.web.http.Request-class.html#getHost">getHost</a></code>, <code><a href="twisted.web.http.Request-class.html#getPassword">getPassword</a></code>, <code><a href="twisted.web.http.Request-class.html#getRequestHostname">getRequestHostname</a></code>, <code><a href="twisted.web.http.Request-class.html#getUser">getUser</a></code>, <code><a href="twisted.web.http.Request-class.html#gotLength">gotLength</a></code>, <code><a href="twisted.web.http.Request-class.html#handleContentChunk">handleContentChunk</a></code>, <code><a href="twisted.web.http.Request-class.html#isSecure">isSecure</a></code>, <code><a href="twisted.web.http.Request-class.html#noLongerQueued">noLongerQueued</a></code>, <code><a href="twisted.web.http.Request-class.html#parseCookies">parseCookies</a></code>, <code><a href="twisted.web.http.Request-class.html#redirect">redirect</a></code>, <code><a href="twisted.web.http.Request-class.html#registerProducer">registerProducer</a></code>, <code><a href="twisted.web.http.Request-class.html#requestReceived">requestReceived</a></code>, <code><a href="twisted.web.http.Request-class.html#setETag">setETag</a></code>, <code><a href="twisted.web.http.Request-class.html#setHeader">setHeader</a></code>, <code><a href="twisted.web.http.Request-class.html#setHost">setHost</a></code>, <code><a href="twisted.web.http.Request-class.html#setLastModified">setLastModified</a></code>, <code><a href="twisted.web.http.Request-class.html#setResponseCode">setResponseCode</a></code>, <code><a href="twisted.web.http.Request-class.html#unregisterProducer">unregisterProducer</a></code> </p> <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="twisted.web.http.Request-class.html">twisted.web.http.Request</a></code></b> (private): <code><a href="twisted.web.http.Request-class.html#_authorize" onclick="show_private();">_authorize</a></code>, <code><a href="twisted.web.http.Request-class.html#_cleanup" onclick="show_private();">_cleanup</a></code>, <code><a href="twisted.web.http.Request-class.html#_sendError" onclick="show_private();">_sendError</a></code> </p></div> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.python.components.Componentized</code></b>: <code>__conform__</code>, <code>addAdapter</code>, <code>addComponent</code>, <code>getComponent</code>, <code>locateAdapterClass</code>, <code>removeComponent</code>, <code>setAdapter</code>, <code>setComponent</code>, <code>unsetComponent</code> </p> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.persisted.styles.Versioned</code></b>: <code>__getstate__</code>, <code>__setstate__</code>, <code>versionUpgrade</code> </p> </td> </tr> </table> <!-- ==================== CLASS VARIABLES ==================== --> <a name="section-ClassVariables"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Class Variables</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-ClassVariables" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.web.server.Request</code></b>: <code>__pychecker__</code>, <code>appRootURL</code>, <code>session</code>, <code>site</code> </p> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.spread.flavors.Copyable</code></b>: <code>__implemented__</code> </p> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="twisted.web.http.Request-class.html">twisted.web.http.Request</a></code></b>: <code><a href="twisted.web.http.Request-class.html#chunked">chunked</a></code>, <code><a href="twisted.web.http.Request-class.html#clientproto">clientproto</a></code>, <code><a href="twisted.web.http.Request-class.html#code">code</a></code>, <code><a href="twisted.web.http.Request-class.html#code_message">code_message</a></code>, <code><a href="twisted.web.http.Request-class.html#etag">etag</a></code>, <code><a href="twisted.web.http.Request-class.html#finished">finished</a></code>, <code><a href="twisted.web.http.Request-class.html#lastModified">lastModified</a></code>, <code><a href="twisted.web.http.Request-class.html#producer">producer</a></code>, <code><a href="twisted.web.http.Request-class.html#sentLength">sentLength</a></code>, <code><a href="twisted.web.http.Request-class.html#startedWriting">startedWriting</a></code> </p> <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="twisted.web.http.Request-class.html">twisted.web.http.Request</a></code></b> (private): <code><a href="twisted.web.http.Request-class.html#_forceSSL" onclick="show_private();">_forceSSL</a></code> </p></div> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.python.components.Componentized</code></b>: <code>persistenceVersion</code> </p> <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.persisted.styles.Versioned</code></b>: <code>persistenceForgets</code> </p> </td> </tr> </table> <!-- ==================== INSTANCE VARIABLES ==================== --> <a name="section-InstanceVariables"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Instance Variables</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-InstanceVariables" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="twisted.web.http.Request-class.html">twisted.web.http.Request</a></code></b>: <code><a href="twisted.web.http.Request-class.html#args">args</a></code>, <code><a href="twisted.web.http.Request-class.html#headers">headers</a></code>, <code><a href="twisted.web.http.Request-class.html#method">method</a></code>, <code><a href="twisted.web.http.Request-class.html#path">path</a></code>, <code><a href="twisted.web.http.Request-class.html#received_headers">received_headers</a></code>, <code><a href="twisted.web.http.Request-class.html#requestHeaders">requestHeaders</a></code>, <code><a href="twisted.web.http.Request-class.html#responseHeaders">responseHeaders</a></code>, <code><a href="twisted.web.http.Request-class.html#uri">uri</a></code> </p> </td> </tr> </table> <!-- ==================== METHOD DETAILS ==================== --> <a name="section-MethodDetails"></a> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Method Details</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-MethodDetails" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> </table> <a name="__init__"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, <span class="sig-arg">channel</span>, <span class="sig-arg">queued</span>)</span> <br /><em class="fname">(Constructor)</em> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.__init__">source code</a></span> </td> </tr></table> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>channel</code></strong> - the channel we're connected to.</li> <li><strong class="pname"><code>queued</code></strong> - are we in the request queue, or can we start writing to the transport?</li> </ul></dd> <dt>Overrides: twisted.python.components.Componentized.__init__ </dt> </dl> </td></tr></table> </div> <a name="write"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">write</span>(<span class="sig-arg">self</span>, <span class="sig-arg">data</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.write">source code</a></span> </td> </tr></table> <p>Write some data as a result of an HTTP request. The first time this is called, it writes out response data.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>data</code></strong> - Some bytes to be sent as part of the response body.</li> </ul></dd> <dt>Overrides: twisted.web.http.Request.write <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <a name="finish"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">finish</span>(<span class="sig-arg">self</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.finish">source code</a></span> </td> </tr></table> <p>We are finished writing data.</p> <dl class="fields"> <dt>Overrides: twisted.web.http.Request.finish <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <a name="connectionLost"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">connectionLost</span>(<span class="sig-arg">self</span>, <span class="sig-arg">reason</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="flumotion.component.misc.httpserver.httpserver-pysrc.html#CancellableRequest.connectionLost">source code</a></span> </td> </tr></table> <p>connection was lost</p> <dl class="fields"> <dt>Overrides: twisted.web.http.Request.connectionLost <dd><em class="note">(inherited documentation)</em></dd> </dt> </dl> </td></tr></table> </div> <br /> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <th class="navbar" width="100%"></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> Generated by Epydoc 3.0.1 on Wed Aug 11 21:33:15 2010 </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>