| Index: tools/telemetry/docs/telemetry.core.memory_cache_http_server.html
|
| diff --git a/tools/telemetry/docs/telemetry.core.memory_cache_http_server.html b/tools/telemetry/docs/telemetry.core.memory_cache_http_server.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a3d6ee62b483abd8e9602c86ea9bc942f31fc366
|
| --- /dev/null
|
| +++ b/tools/telemetry/docs/telemetry.core.memory_cache_http_server.html
|
| @@ -0,0 +1,559 @@
|
| +
|
| +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| +<html><head><title>Python: module telemetry.core.memory_cache_http_server</title>
|
| +</head><body bgcolor="#f0f0f8">
|
| +
|
| +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
| +<tr bgcolor="#7799ee">
|
| +<td valign=bottom> <br>
|
| +<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.core.html"><font color="#ffffff">core</font></a>.memory_cache_http_server</strong></big></big></font></td
|
| +><td align=right valign=bottom
|
| +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/memory_cache_http_server.py">/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/memory_cache_http_server.py</a></font></td></tr></table>
|
| + <p><tt># Copyright (c) 2012 The Chromium Authors. All rights reserved.<br>
|
| +# Use of this source code is governed by a BSD-style license that can be<br>
|
| +# found in the LICENSE file.</tt></p>
|
| +<p>
|
| +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
| +<tr bgcolor="#aa55cc">
|
| +<td colspan=3 valign=bottom> <br>
|
| +<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
| +
|
| +<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
| +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="BaseHTTPServer.html">BaseHTTPServer</a><br>
|
| +<a href="SimpleHTTPServer.html">SimpleHTTPServer</a><br>
|
| +</td><td width="25%" valign=top><a href="SocketServer.html">SocketServer</a><br>
|
| +<a href="mimetypes.html">mimetypes</a><br>
|
| +</td><td width="25%" valign=top><a href="os.html">os</a><br>
|
| +<a href="sys.html">sys</a><br>
|
| +</td><td width="25%" valign=top><a href="zlib.html">zlib</a><br>
|
| +</td></tr></table></td></tr></table><p>
|
| +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
| +<tr bgcolor="#ee77aa">
|
| +<td colspan=3 valign=bottom> <br>
|
| +<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
| +
|
| +<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
| +<td width="100%"><dl>
|
| +<dt><font face="helvetica, arial"><a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.HTTPServer</a>(<a href="SocketServer.html#TCPServer">SocketServer.TCPServer</a>)
|
| +</font></dt><dd>
|
| +<dl>
|
| +<dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_server.html#MemoryCacheHTTPServer">MemoryCacheHTTPServer</a>(<a href="SocketServer.html#ThreadingMixIn">SocketServer.ThreadingMixIn</a>, <a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.HTTPServer</a>)
|
| +</font></dt></dl>
|
| +</dd>
|
| +<dt><font face="helvetica, arial"><a href="SimpleHTTPServer.html#SimpleHTTPRequestHandler">SimpleHTTPServer.SimpleHTTPRequestHandler</a>(<a href="BaseHTTPServer.html#BaseHTTPRequestHandler">BaseHTTPServer.BaseHTTPRequestHandler</a>)
|
| +</font></dt><dd>
|
| +<dl>
|
| +<dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_server.html#MemoryCacheHTTPRequestHandler">MemoryCacheHTTPRequestHandler</a>
|
| +</font></dt></dl>
|
| +</dd>
|
| +<dt><font face="helvetica, arial"><a href="SocketServer.html#ThreadingMixIn">SocketServer.ThreadingMixIn</a>
|
| +</font></dt><dd>
|
| +<dl>
|
| +<dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_server.html#MemoryCacheHTTPServer">MemoryCacheHTTPServer</a>(<a href="SocketServer.html#ThreadingMixIn">SocketServer.ThreadingMixIn</a>, <a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.HTTPServer</a>)
|
| +</font></dt></dl>
|
| +</dd>
|
| +<dt><font face="helvetica, arial"><a href="__builtin__.html#tuple">__builtin__.tuple</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
|
| +</font></dt><dd>
|
| +<dl>
|
| +<dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_server.html#ByteRange">ByteRange</a>
|
| +</font></dt><dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_server.html#ResourceAndRange">ResourceAndRange</a>
|
| +</font></dt></dl>
|
| +</dd>
|
| +</dl>
|
| + <p>
|
| +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
| +<tr bgcolor="#ffc8d8">
|
| +<td colspan=3 valign=bottom> <br>
|
| +<font color="#000000" face="helvetica, arial"><a name="ByteRange">class <strong>ByteRange</strong></a>(<a href="__builtin__.html#tuple">__builtin__.tuple</a>)</font></td></tr>
|
| +
|
| +<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
| +<td colspan=2><tt><a href="#ByteRange">ByteRange</a>(from_byte, to_byte)<br> </tt></td></tr>
|
| +<tr><td> </td>
|
| +<td width="100%"><dl><dt>Method resolution order:</dt>
|
| +<dd><a href="telemetry.core.memory_cache_http_server.html#ByteRange">ByteRange</a></dd>
|
| +<dd><a href="__builtin__.html#tuple">__builtin__.tuple</a></dd>
|
| +<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
| +</dl>
|
| +<hr>
|
| +Methods defined here:<br>
|
| +<dl><dt><a name="ByteRange-__getnewargs__"><strong>__getnewargs__</strong></a>(self)</dt><dd><tt>Return self as a plain <a href="__builtin__.html#tuple">tuple</a>. Used by copy and pickle.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return a nicely formatted representation string</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-_asdict"><strong>_asdict</strong></a>(self)</dt><dd><tt>Return a new OrderedDict which maps field names to their values</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-_replace"><strong>_replace</strong></a>(_self, **kwds)</dt><dd><tt>Return a new <a href="#ByteRange">ByteRange</a> object replacing specified fields with new values</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Class methods defined here:<br>
|
| +<dl><dt><a name="ByteRange-_make"><strong>_make</strong></a>(cls, iterable, new<font color="#909090">=<built-in method __new__ of type object></font>, len<font color="#909090">=<built-in function len></font>)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Make a new <a href="#ByteRange">ByteRange</a> object from a sequence or iterable</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Static methods defined here:<br>
|
| +<dl><dt><a name="ByteRange-__new__"><strong>__new__</strong></a>(_cls, from_byte, to_byte)</dt><dd><tt>Create new instance of <a href="#ByteRange">ByteRange</a>(from_byte, to_byte)</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Data descriptors defined here:<br>
|
| +<dl><dt><strong>from_byte</strong></dt>
|
| +<dd><tt>Alias for field number 0</tt></dd>
|
| +</dl>
|
| +<dl><dt><strong>to_byte</strong></dt>
|
| +<dd><tt>Alias for field number 1</tt></dd>
|
| +</dl>
|
| +<hr>
|
| +Data and other attributes defined here:<br>
|
| +<dl><dt><strong>_fields</strong> = ('from_byte', 'to_byte')</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<br>
|
| +<dl><dt><a name="ByteRange-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
| + <br>
|
| +Use of negative indices is not supported.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#ByteRange-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>T.<a href="#ByteRange-__sizeof__">__sizeof__</a>() -- size of T in memory, in bytes</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-count"><strong>count</strong></a>(...)</dt><dd><tt>T.<a href="#ByteRange-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ByteRange-index"><strong>index</strong></a>(...)</dt><dd><tt>T.<a href="#ByteRange-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value.<br>
|
| +Raises ValueError if the value is not present.</tt></dd></dl>
|
| +
|
| +</td></tr></table> <p>
|
| +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
| +<tr bgcolor="#ffc8d8">
|
| +<td colspan=3 valign=bottom> <br>
|
| +<font color="#000000" face="helvetica, arial"><a name="MemoryCacheHTTPRequestHandler">class <strong>MemoryCacheHTTPRequestHandler</strong></a>(<a href="SimpleHTTPServer.html#SimpleHTTPRequestHandler">SimpleHTTPServer.SimpleHTTPRequestHandler</a>)</font></td></tr>
|
| +
|
| +<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
| +<td width="100%"><dl><dt>Method resolution order:</dt>
|
| +<dd><a href="telemetry.core.memory_cache_http_server.html#MemoryCacheHTTPRequestHandler">MemoryCacheHTTPRequestHandler</a></dd>
|
| +<dd><a href="SimpleHTTPServer.html#SimpleHTTPRequestHandler">SimpleHTTPServer.SimpleHTTPRequestHandler</a></dd>
|
| +<dd><a href="BaseHTTPServer.html#BaseHTTPRequestHandler">BaseHTTPServer.BaseHTTPRequestHandler</a></dd>
|
| +<dd><a href="SocketServer.html#StreamRequestHandler">SocketServer.StreamRequestHandler</a></dd>
|
| +<dd><a href="SocketServer.html#BaseRequestHandler">SocketServer.BaseRequestHandler</a></dd>
|
| +</dl>
|
| +<hr>
|
| +Methods defined here:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-GetByteRange"><strong>GetByteRange</strong></a>(self, total_num_of_bytes)</dt><dd><tt>Parse the header and get the range values specified.<br>
|
| + <br>
|
| +Args:<br>
|
| + total_num_of_bytes: Total # of bytes in requested resource,<br>
|
| + used to calculate upper range limit.<br>
|
| +Returns:<br>
|
| + A <a href="#ByteRange">ByteRange</a> namedtuple object with the requested byte-range values.<br>
|
| + If no Range is explicitly requested or there is a failure parsing,<br>
|
| + return None.<br>
|
| + Special case: If range specified is in the format "N-", return N-N.<br>
|
| + If upper range limit is greater than total # of bytes, return upper index.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-SendHead"><strong>SendHead</strong></a>(self)</dt></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-do_GET"><strong>do_GET</strong></a>(self)</dt><dd><tt>Serve a GET request.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-do_HEAD"><strong>do_HEAD</strong></a>(self)</dt><dd><tt>Serve a HEAD request.</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="SimpleHTTPServer.html#SimpleHTTPRequestHandler">SimpleHTTPServer.SimpleHTTPRequestHandler</a>:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-copyfile"><strong>copyfile</strong></a>(self, source, outputfile)</dt><dd><tt>Copy all data between two file objects.<br>
|
| + <br>
|
| +The SOURCE argument is a file object open for reading<br>
|
| +(or anything with a read() method) and the DESTINATION<br>
|
| +argument is a file object open for writing (or<br>
|
| +anything with a write() method).<br>
|
| + <br>
|
| +The only reason for overriding this would be to change<br>
|
| +the block size or perhaps to replace newlines by CRLF<br>
|
| +-- note however that this the default server uses this<br>
|
| +to copy binary data as well.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-guess_type"><strong>guess_type</strong></a>(self, path)</dt><dd><tt>Guess the type of a file.<br>
|
| + <br>
|
| +Argument is a PATH (a filename).<br>
|
| + <br>
|
| +Return value is a string of the form type/subtype,<br>
|
| +usable for a MIME Content-type header.<br>
|
| + <br>
|
| +The default implementation looks the file's extension<br>
|
| +up in the table self.<strong>extensions_map</strong>, using application/octet-stream<br>
|
| +as a default; however it would be permissible (if<br>
|
| +slow) to look inside the data to make a better guess.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-list_directory"><strong>list_directory</strong></a>(self, path)</dt><dd><tt>Helper to produce a directory listing (absent index.html).<br>
|
| + <br>
|
| +Return value is either a file object, or None (indicating an<br>
|
| +error). In either case, the headers are sent, making the<br>
|
| +interface the same as for <a href="#MemoryCacheHTTPRequestHandler-send_head">send_head</a>().</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-send_head"><strong>send_head</strong></a>(self)</dt><dd><tt>Common code for GET and HEAD commands.<br>
|
| + <br>
|
| +This sends the response code and MIME headers.<br>
|
| + <br>
|
| +Return value is either a file object (which has to be copied<br>
|
| +to the outputfile by the caller unless the command was HEAD,<br>
|
| +and must be closed by the caller under all circumstances), or<br>
|
| +None, in which case the caller has nothing further to do.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-translate_path"><strong>translate_path</strong></a>(self, path)</dt><dd><tt>Translate a /-separated PATH to the local filename syntax.<br>
|
| + <br>
|
| +Components that mean special things to the local file system<br>
|
| +(e.g. drive or directory names) are ignored. (XXX They should<br>
|
| +probably be diagnosed.)</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Data and other attributes inherited from <a href="SimpleHTTPServer.html#SimpleHTTPRequestHandler">SimpleHTTPServer.SimpleHTTPRequestHandler</a>:<br>
|
| +<dl><dt><strong>extensions_map</strong> = {'': 'application/octet-stream', '.123': 'application/vnd.lotus-1-2-3', '.3dml': 'text/vnd.in3d.3dml', '.3g2': 'video/3gpp2', '.3gp': 'video/3gpp', '.7z': 'application/x-7z-compressed', '.a': 'application/octet-stream', '.aab': 'application/x-authorware-bin', '.aac': 'audio/x-aac', '.aam': 'application/x-authorware-map', ...}</dl>
|
| +
|
| +<dl><dt><strong>server_version</strong> = 'SimpleHTTP/0.6'</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="BaseHTTPServer.html#BaseHTTPRequestHandler">BaseHTTPServer.BaseHTTPRequestHandler</a>:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-address_string"><strong>address_string</strong></a>(self)</dt><dd><tt>Return the client address formatted for logging.<br>
|
| + <br>
|
| +This version looks up the full hostname using gethostbyaddr(),<br>
|
| +and tries to find a name that contains at least one dot.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-date_time_string"><strong>date_time_string</strong></a>(self, timestamp<font color="#909090">=None</font>)</dt><dd><tt>Return the current date and time formatted for a message header.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-end_headers"><strong>end_headers</strong></a>(self)</dt><dd><tt>Send the blank line ending the MIME headers.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-handle"><strong>handle</strong></a>(self)</dt><dd><tt>Handle multiple requests if necessary.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-handle_one_request"><strong>handle_one_request</strong></a>(self)</dt><dd><tt>Handle a single HTTP request.<br>
|
| + <br>
|
| +You normally don't need to override this method; see the class<br>
|
| +__doc__ string for information on how to handle specific HTTP<br>
|
| +commands such as GET and POST.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-log_date_time_string"><strong>log_date_time_string</strong></a>(self)</dt><dd><tt>Return the current time formatted for logging.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-log_error"><strong>log_error</strong></a>(self, format, *args)</dt><dd><tt>Log an error.<br>
|
| + <br>
|
| +This is called when a request cannot be fulfilled. By<br>
|
| +default it passes the message on to <a href="#MemoryCacheHTTPRequestHandler-log_message">log_message</a>().<br>
|
| + <br>
|
| +Arguments are the same as for <a href="#MemoryCacheHTTPRequestHandler-log_message">log_message</a>().<br>
|
| + <br>
|
| +XXX This should go to the separate error log.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-log_message"><strong>log_message</strong></a>(self, format, *args)</dt><dd><tt>Log an arbitrary message.<br>
|
| + <br>
|
| +This is used by all other logging functions. Override<br>
|
| +it if you have specific logging wishes.<br>
|
| + <br>
|
| +The first argument, FORMAT, is a format string for the<br>
|
| +message to be logged. If the format string contains<br>
|
| +any % escapes requiring parameters, they should be<br>
|
| +specified as subsequent arguments (it's just like<br>
|
| +printf!).<br>
|
| + <br>
|
| +The client host and current date/time are prefixed to<br>
|
| +every message.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-log_request"><strong>log_request</strong></a>(self, code<font color="#909090">='-'</font>, size<font color="#909090">='-'</font>)</dt><dd><tt>Log an accepted request.<br>
|
| + <br>
|
| +This is called by <a href="#MemoryCacheHTTPRequestHandler-send_response">send_response</a>().</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-parse_request"><strong>parse_request</strong></a>(self)</dt><dd><tt>Parse a request (internal).<br>
|
| + <br>
|
| +The request should be stored in self.<strong>raw_requestline</strong>; the results<br>
|
| +are in self.<strong>command</strong>, self.<strong>path</strong>, self.<strong>request_version</strong> and<br>
|
| +self.<strong>headers</strong>.<br>
|
| + <br>
|
| +Return True for success, False for failure; on failure, an<br>
|
| +error is sent back.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-send_error"><strong>send_error</strong></a>(self, code, message<font color="#909090">=None</font>)</dt><dd><tt>Send and log an error reply.<br>
|
| + <br>
|
| +Arguments are the error code, and a detailed message.<br>
|
| +The detailed message defaults to the short entry matching the<br>
|
| +response code.<br>
|
| + <br>
|
| +This sends an error response (so it must be called before any<br>
|
| +output has been generated), logs the error, and finally sends<br>
|
| +a piece of HTML explaining the error to the user.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-send_header"><strong>send_header</strong></a>(self, keyword, value)</dt><dd><tt>Send a MIME header.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-send_response"><strong>send_response</strong></a>(self, code, message<font color="#909090">=None</font>)</dt><dd><tt>Send the response header and log the response code.<br>
|
| + <br>
|
| +Also send two standard headers with the server software<br>
|
| +version and the current date.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-version_string"><strong>version_string</strong></a>(self)</dt><dd><tt>Return the server software version string.</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Data and other attributes inherited from <a href="BaseHTTPServer.html#BaseHTTPRequestHandler">BaseHTTPServer.BaseHTTPRequestHandler</a>:<br>
|
| +<dl><dt><strong>MessageClass</strong> = <class mimetools.Message></dl>
|
| +
|
| +<dl><dt><strong>default_request_version</strong> = 'HTTP/0.9'</dl>
|
| +
|
| +<dl><dt><strong>error_content_type</strong> = 'text/html'</dl>
|
| +
|
| +<dl><dt><strong>error_message_format</strong> = '<head><font color="#c040c0">\n</font><title>Error response</title><font color="#c040c0">\n</font></head><font color="#c040c0">\n</font><bo...ode explanation: %(code)s = %(explain)s.<font color="#c040c0">\n</font></body><font color="#c040c0">\n</font>'</dl>
|
| +
|
| +<dl><dt><strong>monthname</strong> = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']</dl>
|
| +
|
| +<dl><dt><strong>protocol_version</strong> = 'HTTP/1.0'</dl>
|
| +
|
| +<dl><dt><strong>responses</strong> = {100: ('Continue', 'Request received, please continue'), 101: ('Switching Protocols', 'Switching to new protocol; obey Upgrade header'), 200: ('OK', 'Request fulfilled, document follows'), 201: ('Created', 'Document created, URL follows'), 202: ('Accepted', 'Request accepted, processing continues off-line'), 203: ('Non-Authoritative Information', 'Request fulfilled from cache'), 204: ('No Content', 'Request fulfilled, nothing follows'), 205: ('Reset Content', 'Clear input form for further input.'), 206: ('Partial Content', 'Partial content follows.'), 300: ('Multiple Choices', 'Object has several resources -- see URI list'), ...}</dl>
|
| +
|
| +<dl><dt><strong>sys_version</strong> = 'Python/2.7.2'</dl>
|
| +
|
| +<dl><dt><strong>weekdayname</strong> = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="SocketServer.html#StreamRequestHandler">SocketServer.StreamRequestHandler</a>:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-finish"><strong>finish</strong></a>(self)</dt></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-setup"><strong>setup</strong></a>(self)</dt></dl>
|
| +
|
| +<hr>
|
| +Data and other attributes inherited from <a href="SocketServer.html#StreamRequestHandler">SocketServer.StreamRequestHandler</a>:<br>
|
| +<dl><dt><strong>disable_nagle_algorithm</strong> = False</dl>
|
| +
|
| +<dl><dt><strong>rbufsize</strong> = -1</dl>
|
| +
|
| +<dl><dt><strong>timeout</strong> = None</dl>
|
| +
|
| +<dl><dt><strong>wbufsize</strong> = 0</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="SocketServer.html#BaseRequestHandler">SocketServer.BaseRequestHandler</a>:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPRequestHandler-__init__"><strong>__init__</strong></a>(self, request, client_address, server)</dt></dl>
|
| +
|
| +</td></tr></table> <p>
|
| +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
| +<tr bgcolor="#ffc8d8">
|
| +<td colspan=3 valign=bottom> <br>
|
| +<font color="#000000" face="helvetica, arial"><a name="MemoryCacheHTTPServer">class <strong>MemoryCacheHTTPServer</strong></a>(<a href="SocketServer.html#ThreadingMixIn">SocketServer.ThreadingMixIn</a>, <a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.HTTPServer</a>)</font></td></tr>
|
| +
|
| +<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
| +<td width="100%"><dl><dt>Method resolution order:</dt>
|
| +<dd><a href="telemetry.core.memory_cache_http_server.html#MemoryCacheHTTPServer">MemoryCacheHTTPServer</a></dd>
|
| +<dd><a href="SocketServer.html#ThreadingMixIn">SocketServer.ThreadingMixIn</a></dd>
|
| +<dd><a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.HTTPServer</a></dd>
|
| +<dd><a href="SocketServer.html#TCPServer">SocketServer.TCPServer</a></dd>
|
| +<dd><a href="SocketServer.html#BaseServer">SocketServer.BaseServer</a></dd>
|
| +</dl>
|
| +<hr>
|
| +Methods defined here:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPServer-AddDirectoryToResourceMap"><strong>AddDirectoryToResourceMap</strong></a>(self, cwd)</dt><dd><tt>Loads all files in cwd into the in-memory resource map.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-AddFileToResourceMap"><strong>AddFileToResourceMap</strong></a>(self, file_path)</dt><dd><tt>Loads file_path into the in-memory resource map.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-__init__"><strong>__init__</strong></a>(self, host_port, handler, paths)</dt></dl>
|
| +
|
| +<hr>
|
| +Data and other attributes defined here:<br>
|
| +<dl><dt><strong>request_queue_size</strong> = 128</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="SocketServer.html#ThreadingMixIn">SocketServer.ThreadingMixIn</a>:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPServer-process_request"><strong>process_request</strong></a>(self, request, client_address)</dt><dd><tt>Start a new thread to process the request.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-process_request_thread"><strong>process_request_thread</strong></a>(self, request, client_address)</dt><dd><tt>Same as in BaseServer but as a thread.<br>
|
| + <br>
|
| +In addition, exception handling is done here.</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Data and other attributes inherited from <a href="SocketServer.html#ThreadingMixIn">SocketServer.ThreadingMixIn</a>:<br>
|
| +<dl><dt><strong>daemon_threads</strong> = False</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.HTTPServer</a>:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPServer-server_bind"><strong>server_bind</strong></a>(self)</dt><dd><tt>Override server_bind to store the server name.</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Data and other attributes inherited from <a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.HTTPServer</a>:<br>
|
| +<dl><dt><strong>allow_reuse_address</strong> = 1</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="SocketServer.html#TCPServer">SocketServer.TCPServer</a>:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPServer-close_request"><strong>close_request</strong></a>(self, request)</dt><dd><tt>Called to clean up an individual request.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-fileno"><strong>fileno</strong></a>(self)</dt><dd><tt>Return socket file number.<br>
|
| + <br>
|
| +Interface required by select().</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-get_request"><strong>get_request</strong></a>(self)</dt><dd><tt>Get the request and client address from the socket.<br>
|
| + <br>
|
| +May be overridden.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-server_activate"><strong>server_activate</strong></a>(self)</dt><dd><tt>Called by constructor to activate the server.<br>
|
| + <br>
|
| +May be overridden.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-server_close"><strong>server_close</strong></a>(self)</dt><dd><tt>Called to clean-up the server.<br>
|
| + <br>
|
| +May be overridden.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-shutdown_request"><strong>shutdown_request</strong></a>(self, request)</dt><dd><tt>Called to shutdown and close an individual request.</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Data and other attributes inherited from <a href="SocketServer.html#TCPServer">SocketServer.TCPServer</a>:<br>
|
| +<dl><dt><strong>address_family</strong> = 2</dl>
|
| +
|
| +<dl><dt><strong>socket_type</strong> = 1</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="SocketServer.html#BaseServer">SocketServer.BaseServer</a>:<br>
|
| +<dl><dt><a name="MemoryCacheHTTPServer-finish_request"><strong>finish_request</strong></a>(self, request, client_address)</dt><dd><tt>Finish one request by instantiating RequestHandlerClass.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-handle_error"><strong>handle_error</strong></a>(self, request, client_address)</dt><dd><tt>Handle an error gracefully. May be overridden.<br>
|
| + <br>
|
| +The default is to print a traceback and continue.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-handle_request"><strong>handle_request</strong></a>(self)</dt><dd><tt>Handle one request, possibly blocking.<br>
|
| + <br>
|
| +Respects self.<strong>timeout</strong>.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-handle_timeout"><strong>handle_timeout</strong></a>(self)</dt><dd><tt>Called if no new request arrives within self.<strong>timeout</strong>.<br>
|
| + <br>
|
| +Overridden by ForkingMixIn.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-serve_forever"><strong>serve_forever</strong></a>(self, poll_interval<font color="#909090">=0.5</font>)</dt><dd><tt>Handle one request at a time until shutdown.<br>
|
| + <br>
|
| +Polls for shutdown every poll_interval seconds. Ignores<br>
|
| +self.<strong>timeout</strong>. If you need to do periodic tasks, do them in<br>
|
| +another thread.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-shutdown"><strong>shutdown</strong></a>(self)</dt><dd><tt>Stops the serve_forever loop.<br>
|
| + <br>
|
| +Blocks until the loop has finished. This must be called while<br>
|
| +<a href="#MemoryCacheHTTPServer-serve_forever">serve_forever</a>() is running in another thread, or it will<br>
|
| +deadlock.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="MemoryCacheHTTPServer-verify_request"><strong>verify_request</strong></a>(self, request, client_address)</dt><dd><tt>Verify the request. May be overridden.<br>
|
| + <br>
|
| +Return True if we should proceed with this request.</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Data and other attributes inherited from <a href="SocketServer.html#BaseServer">SocketServer.BaseServer</a>:<br>
|
| +<dl><dt><strong>timeout</strong> = None</dl>
|
| +
|
| +</td></tr></table> <p>
|
| +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
| +<tr bgcolor="#ffc8d8">
|
| +<td colspan=3 valign=bottom> <br>
|
| +<font color="#000000" face="helvetica, arial"><a name="ResourceAndRange">class <strong>ResourceAndRange</strong></a>(<a href="__builtin__.html#tuple">__builtin__.tuple</a>)</font></td></tr>
|
| +
|
| +<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
| +<td colspan=2><tt><a href="#ResourceAndRange">ResourceAndRange</a>(resource, byte_range)<br> </tt></td></tr>
|
| +<tr><td> </td>
|
| +<td width="100%"><dl><dt>Method resolution order:</dt>
|
| +<dd><a href="telemetry.core.memory_cache_http_server.html#ResourceAndRange">ResourceAndRange</a></dd>
|
| +<dd><a href="__builtin__.html#tuple">__builtin__.tuple</a></dd>
|
| +<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
| +</dl>
|
| +<hr>
|
| +Methods defined here:<br>
|
| +<dl><dt><a name="ResourceAndRange-__getnewargs__"><strong>__getnewargs__</strong></a>(self)</dt><dd><tt>Return self as a plain <a href="__builtin__.html#tuple">tuple</a>. Used by copy and pickle.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return a nicely formatted representation string</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-_asdict"><strong>_asdict</strong></a>(self)</dt><dd><tt>Return a new OrderedDict which maps field names to their values</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-_replace"><strong>_replace</strong></a>(_self, **kwds)</dt><dd><tt>Return a new <a href="#ResourceAndRange">ResourceAndRange</a> object replacing specified fields with new values</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Class methods defined here:<br>
|
| +<dl><dt><a name="ResourceAndRange-_make"><strong>_make</strong></a>(cls, iterable, new<font color="#909090">=<built-in method __new__ of type object></font>, len<font color="#909090">=<built-in function len></font>)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Make a new <a href="#ResourceAndRange">ResourceAndRange</a> object from a sequence or iterable</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Static methods defined here:<br>
|
| +<dl><dt><a name="ResourceAndRange-__new__"><strong>__new__</strong></a>(_cls, resource, byte_range)</dt><dd><tt>Create new instance of <a href="#ResourceAndRange">ResourceAndRange</a>(resource, byte_range)</tt></dd></dl>
|
| +
|
| +<hr>
|
| +Data descriptors defined here:<br>
|
| +<dl><dt><strong>byte_range</strong></dt>
|
| +<dd><tt>Alias for field number 1</tt></dd>
|
| +</dl>
|
| +<dl><dt><strong>resource</strong></dt>
|
| +<dd><tt>Alias for field number 0</tt></dd>
|
| +</dl>
|
| +<hr>
|
| +Data and other attributes defined here:<br>
|
| +<dl><dt><strong>_fields</strong> = ('resource', 'byte_range')</dl>
|
| +
|
| +<hr>
|
| +Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<br>
|
| +<dl><dt><a name="ResourceAndRange-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
| + <br>
|
| +Use of negative indices is not supported.</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>T.<a href="#ResourceAndRange-__sizeof__">__sizeof__</a>() -- size of T in memory, in bytes</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-count"><strong>count</strong></a>(...)</dt><dd><tt>T.<a href="#ResourceAndRange-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl>
|
| +
|
| +<dl><dt><a name="ResourceAndRange-index"><strong>index</strong></a>(...)</dt><dd><tt>T.<a href="#ResourceAndRange-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value.<br>
|
| +Raises ValueError if the value is not present.</tt></dd></dl>
|
| +
|
| +</td></tr></table></td></tr></table><p>
|
| +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
| +<tr bgcolor="#eeaa77">
|
| +<td colspan=3 valign=bottom> <br>
|
| +<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
| +
|
| +<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
| +<td width="100%"><dl><dt><a name="-Main"><strong>Main</strong></a>()</dt></dl>
|
| +</td></tr></table>
|
| +</body></html>
|
|
|