| |
| <!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="../telemetry/core/memory_cache_http_server.py">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> |
| <a href="SocketServer.html">SocketServer</a><br> |
| </td><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br> |
| <a href="gzip.html">gzip</a><br> |
| <a href="telemetry.core.local_server.html">telemetry.core.local_server</a><br> |
| </td><td width="25%" valign=top><a href="mimetypes.html">mimetypes</a><br> |
| <a href="os.html">os</a><br> |
| <a href="sys.html">sys</a><br> |
| </td><td width="25%" valign=top><a href="urlparse.html">urlparse</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="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="__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> |
| <dt><font face="helvetica, arial"><a href="telemetry.core.local_server.html#LocalServer">telemetry.core.local_server.LocalServer</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#MemoryCacheHTTPServer">MemoryCacheHTTPServer</a> |
| </font></dt></dl> |
| </dd> |
| <dt><font face="helvetica, arial"><a href="telemetry.core.local_server.html#LocalServerBackend">telemetry.core.local_server.LocalServerBackend</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#MemoryCacheHTTPServerBackend">MemoryCacheHTTPServerBackend</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> |
| If range specified is in the format "N-", return N-END. Refer to<br> |
| <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a> for details.<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> |
| |
| <dl><dt><a name="MemoryCacheHTTPRequestHandler-log_error"><strong>log_error</strong></a>(self, fmt, *args)</dt></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></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', '.3ds': 'image/x-3ds', '.3g2': 'video/3gpp2', '.3gp': 'video/3gpp', '.7z': 'application/x-7z-compressed', '.a': 'application/octet-stream', '.aab': 'application/x-authorware-bin', '.aac': 'audio/x-aac', ...}</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_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 ip address and current date/time are prefixed to every<br> |
| message.</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.5'</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="telemetry.core.local_server.html#LocalServer">telemetry.core.local_server.LocalServer</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="telemetry.core.local_server.html#LocalServer">telemetry.core.local_server.LocalServer</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Methods defined here:<br> |
| <dl><dt><a name="MemoryCacheHTTPServer-GetBackendStartupArgs"><strong>GetBackendStartupArgs</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="MemoryCacheHTTPServer-UrlOf"><strong>UrlOf</strong></a>(self, path)</dt></dl> |
| |
| <dl><dt><a name="MemoryCacheHTTPServer-__init__"><strong>__init__</strong></a>(self, paths)</dt></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>paths</strong></dt> |
| </dl> |
| <dl><dt><strong>url</strong></dt> |
| </dl> |
| <hr> |
| Methods inherited from <a href="telemetry.core.local_server.html#LocalServer">telemetry.core.local_server.LocalServer</a>:<br> |
| <dl><dt><a name="MemoryCacheHTTPServer-Close"><strong>Close</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="MemoryCacheHTTPServer-Start"><strong>Start</strong></a>(self, local_server_controller)</dt></dl> |
| |
| <dl><dt><a name="MemoryCacheHTTPServer-__del__"><strong>__del__</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="MemoryCacheHTTPServer-__enter__"><strong>__enter__</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="MemoryCacheHTTPServer-__exit__"><strong>__exit__</strong></a>(self, *args)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="telemetry.core.local_server.html#LocalServer">telemetry.core.local_server.LocalServer</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>is_running</strong></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="MemoryCacheHTTPServerBackend">class <strong>MemoryCacheHTTPServerBackend</strong></a>(<a href="telemetry.core.local_server.html#LocalServerBackend">telemetry.core.local_server.LocalServerBackend</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#MemoryCacheHTTPServerBackend">MemoryCacheHTTPServerBackend</a></dd> |
| <dd><a href="telemetry.core.local_server.html#LocalServerBackend">telemetry.core.local_server.LocalServerBackend</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Methods defined here:<br> |
| <dl><dt><a name="MemoryCacheHTTPServerBackend-ServeForever"><strong>ServeForever</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="MemoryCacheHTTPServerBackend-StartAndGetNamedPorts"><strong>StartAndGetNamedPorts</strong></a>(self, args)</dt></dl> |
| |
| <dl><dt><a name="MemoryCacheHTTPServerBackend-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="telemetry.core.local_server.html#LocalServerBackend">telemetry.core.local_server.LocalServerBackend</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</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="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> |
| </body></html> |