<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Python: package telemetry.internal.forwarders</title> <meta charset="utf-8"> </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.internal.html"><font color="#ffffff">internal</font></a>.forwarders</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/forwarders/__init__.py">telemetry/internal/forwarders/__init__.py</a></font></td></tr></table> <p><tt># Copyright 2014 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>Package Contents</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="telemetry.internal.forwarders.android_forwarder.html">android_forwarder</a><br> <a href="telemetry.internal.forwarders.cros_forwarder.html">cros_forwarder</a><br> </td><td width="25%" valign=top><a href="telemetry.internal.forwarders.cros_forwarder_unittest.html">cros_forwarder_unittest</a><br> <a href="telemetry.internal.forwarders.do_nothing_forwarder.html">do_nothing_forwarder</a><br> </td><td width="25%" valign=top><a href="telemetry.internal.forwarders.do_nothing_forwarder_unittest.html">do_nothing_forwarder_unittest</a><br> </td><td width="25%" valign=top></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="__builtin__.html#object">__builtin__.object</a> </font></dt><dd> <dl> <dt><font face="helvetica, arial"><a href="telemetry.internal.forwarders.html#Forwarder">Forwarder</a> </font></dt><dt><font face="helvetica, arial"><a href="telemetry.internal.forwarders.html#ForwarderFactory">ForwarderFactory</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.internal.forwarders.html#PortPair">PortPair</a> </font></dt><dt><font face="helvetica, arial"><a href="telemetry.internal.forwarders.html#PortPairs">PortPairs</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="Forwarder">class <strong>Forwarder</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Forwarder-Close"><strong>Close</strong></a>(self)</dt></dl> <dl><dt><a name="Forwarder-__init__"><strong>__init__</strong></a>(self, port_pairs)</dt></dl> <hr> Data descriptors defined here:<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>host_ip</strong></dt> </dl> <dl><dt><strong>host_port</strong></dt> </dl> <dl><dt><strong>port_pairs</strong></dt> </dl> <dl><dt><strong>url</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="ForwarderFactory">class <strong>ForwarderFactory</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> <dl><dt><a name="ForwarderFactory-Create"><strong>Create</strong></a>(self, port_pairs)</dt><dd><tt>Creates a forwarder that maps remote (device) <-> local (host) ports.<br> <br> Args:<br> port_pairs: A <a href="#PortPairs">PortPairs</a> instance that consists of a <a href="#PortPair">PortPair</a> mapping<br> for each protocol. http is required. https and dns may be None.</tt></dd></dl> <hr> Data descriptors defined here:<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>does_forwarder_override_dns</strong></dt> </dl> <dl><dt><strong>host_ip</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="PortPair">class <strong>PortPair</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="#PortPair">PortPair</a>(local_port, remote_port)<br> </tt></td></tr> <tr><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> <dd><a href="telemetry.internal.forwarders.html#PortPair">PortPair</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="PortPair-__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="PortPair-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Exclude the OrderedDict from pickling</tt></dd></dl> <dl><dt><a name="PortPair-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return a nicely formatted representation string</tt></dd></dl> <dl><dt><a name="PortPair-_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="PortPair-_replace"><strong>_replace</strong></a>(_self, **kwds)</dt><dd><tt>Return a new <a href="#PortPair">PortPair</a> <a href="__builtin__.html#object">object</a> replacing specified fields with new values</tt></dd></dl> <hr> Class methods defined here:<br> <dl><dt><a name="PortPair-_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="#PortPair">PortPair</a> <a href="__builtin__.html#object">object</a> from a sequence or iterable</tt></dd></dl> <hr> Static methods defined here:<br> <dl><dt><a name="PortPair-__new__"><strong>__new__</strong></a>(_cls, local_port, remote_port)</dt><dd><tt>Create new instance of <a href="#PortPair">PortPair</a>(local_port, remote_port)</tt></dd></dl> <hr> Data descriptors defined here:<br> <dl><dt><strong>__dict__</strong></dt> <dd><tt>Return a new OrderedDict which maps field names to their values</tt></dd> </dl> <dl><dt><strong>local_port</strong></dt> <dd><tt>Alias for field number 0</tt></dd> </dl> <dl><dt><strong>remote_port</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> = ('local_port', 'remote_port')</dl> <hr> Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<br> <dl><dt><a name="PortPair-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__add__">__add__</a>(y) <==> x+y</tt></dd></dl> <dl><dt><a name="PortPair-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl> <dl><dt><a name="PortPair-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl> <dl><dt><a name="PortPair-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl> <dl><dt><a name="PortPair-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> <dl><dt><a name="PortPair-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> <dl><dt><a name="PortPair-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> <br> Use of negative indices is not supported.</tt></dd></dl> <dl><dt><a name="PortPair-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl> <dl><dt><a name="PortPair-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl> <dl><dt><a name="PortPair-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl> <dl><dt><a name="PortPair-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl> <dl><dt><a name="PortPair-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__len__">__len__</a>() <==> len(x)</tt></dd></dl> <dl><dt><a name="PortPair-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl> <dl><dt><a name="PortPair-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl> <dl><dt><a name="PortPair-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl> <dl><dt><a name="PortPair-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPair-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl> <dl><dt><a name="PortPair-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>T.<a href="#PortPair-__sizeof__">__sizeof__</a>() -- size of T in memory, in bytes</tt></dd></dl> <dl><dt><a name="PortPair-count"><strong>count</strong></a>(...)</dt><dd><tt>T.<a href="#PortPair-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl> <dl><dt><a name="PortPair-index"><strong>index</strong></a>(...)</dt><dd><tt>T.<a href="#PortPair-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="PortPairs">class <strong>PortPairs</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="#PortPairs">PortPairs</a>(http, https, dns)<br> </tt></td></tr> <tr><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> <dd><a href="telemetry.internal.forwarders.html#PortPairs">PortPairs</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="PortPairs-__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="PortPairs-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Exclude the OrderedDict from pickling</tt></dd></dl> <dl><dt><a name="PortPairs-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return a nicely formatted representation string</tt></dd></dl> <dl><dt><a name="PortPairs-_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="PortPairs-_replace"><strong>_replace</strong></a>(_self, **kwds)</dt><dd><tt>Return a new <a href="#PortPairs">PortPairs</a> <a href="__builtin__.html#object">object</a> replacing specified fields with new values</tt></dd></dl> <hr> Class methods defined here:<br> <dl><dt><a name="PortPairs-_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="#PortPairs">PortPairs</a> <a href="__builtin__.html#object">object</a> from a sequence or iterable</tt></dd></dl> <hr> Static methods defined here:<br> <dl><dt><a name="PortPairs-__new__"><strong>__new__</strong></a>(_cls, http, https, dns)</dt><dd><tt>Create new instance of <a href="#PortPairs">PortPairs</a>(http, https, dns)</tt></dd></dl> <hr> Data descriptors defined here:<br> <dl><dt><strong>__dict__</strong></dt> <dd><tt>Return a new OrderedDict which maps field names to their values</tt></dd> </dl> <dl><dt><strong>dns</strong></dt> <dd><tt>Alias for field number 2</tt></dd> </dl> <dl><dt><strong>http</strong></dt> <dd><tt>Alias for field number 0</tt></dd> </dl> <dl><dt><strong>https</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> = ('http', 'https', 'dns')</dl> <hr> Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<br> <dl><dt><a name="PortPairs-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__add__">__add__</a>(y) <==> x+y</tt></dd></dl> <dl><dt><a name="PortPairs-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl> <dl><dt><a name="PortPairs-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl> <dl><dt><a name="PortPairs-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl> <dl><dt><a name="PortPairs-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> <dl><dt><a name="PortPairs-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> <dl><dt><a name="PortPairs-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> <br> Use of negative indices is not supported.</tt></dd></dl> <dl><dt><a name="PortPairs-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl> <dl><dt><a name="PortPairs-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl> <dl><dt><a name="PortPairs-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl> <dl><dt><a name="PortPairs-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl> <dl><dt><a name="PortPairs-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__len__">__len__</a>() <==> len(x)</tt></dd></dl> <dl><dt><a name="PortPairs-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl> <dl><dt><a name="PortPairs-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl> <dl><dt><a name="PortPairs-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl> <dl><dt><a name="PortPairs-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#PortPairs-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl> <dl><dt><a name="PortPairs-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>T.<a href="#PortPairs-__sizeof__">__sizeof__</a>() -- size of T in memory, in bytes</tt></dd></dl> <dl><dt><a name="PortPairs-count"><strong>count</strong></a>(...)</dt><dd><tt>T.<a href="#PortPairs-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl> <dl><dt><a name="PortPairs-index"><strong>index</strong></a>(...)</dt><dd><tt>T.<a href="#PortPairs-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>