1 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3<html><head><title>Python: package telemetry.internal.forwarders</title> 4<meta charset="utf-8"> 5</head><body bgcolor="#f0f0f8"> 6 7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8<tr bgcolor="#7799ee"> 9<td valign=bottom> <br> 10<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 11><td align=right valign=bottom 12><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> 13 <p><tt># Copyright 2014 The Chromium Authors. All rights reserved.<br> 14# Use of this source code is governed by a BSD-style license that can be<br> 15# found in the LICENSE file.</tt></p> 16<p> 17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 18<tr bgcolor="#aa55cc"> 19<td colspan=3 valign=bottom> <br> 20<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr> 21 22<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 23<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> 24<a href="telemetry.internal.forwarders.cros_forwarder.html">cros_forwarder</a><br> 25</td><td width="25%" valign=top><a href="telemetry.internal.forwarders.cros_forwarder_unittest.html">cros_forwarder_unittest</a><br> 26<a href="telemetry.internal.forwarders.do_nothing_forwarder.html">do_nothing_forwarder</a><br> 27</td><td width="25%" valign=top><a href="telemetry.internal.forwarders.do_nothing_forwarder_unittest.html">do_nothing_forwarder_unittest</a><br> 28</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> 29<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 30<tr bgcolor="#ee77aa"> 31<td colspan=3 valign=bottom> <br> 32<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 33 34<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 35<td width="100%"><dl> 36<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 37</font></dt><dd> 38<dl> 39<dt><font face="helvetica, arial"><a href="telemetry.internal.forwarders.html#Forwarder">Forwarder</a> 40</font></dt><dt><font face="helvetica, arial"><a href="telemetry.internal.forwarders.html#ForwarderFactory">ForwarderFactory</a> 41</font></dt></dl> 42</dd> 43<dt><font face="helvetica, arial"><a href="__builtin__.html#tuple">__builtin__.tuple</a>(<a href="__builtin__.html#object">__builtin__.object</a>) 44</font></dt><dd> 45<dl> 46<dt><font face="helvetica, arial"><a href="telemetry.internal.forwarders.html#PortPair">PortPair</a> 47</font></dt><dt><font face="helvetica, arial"><a href="telemetry.internal.forwarders.html#PortPairs">PortPairs</a> 48</font></dt></dl> 49</dd> 50</dl> 51 <p> 52<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 53<tr bgcolor="#ffc8d8"> 54<td colspan=3 valign=bottom> <br> 55<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> 56 57<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 58<td width="100%">Methods defined here:<br> 59<dl><dt><a name="Forwarder-Close"><strong>Close</strong></a>(self)</dt></dl> 60 61<dl><dt><a name="Forwarder-__init__"><strong>__init__</strong></a>(self, port_pairs)</dt></dl> 62 63<hr> 64Data descriptors defined here:<br> 65<dl><dt><strong>__dict__</strong></dt> 66<dd><tt>dictionary for instance variables (if defined)</tt></dd> 67</dl> 68<dl><dt><strong>__weakref__</strong></dt> 69<dd><tt>list of weak references to the object (if defined)</tt></dd> 70</dl> 71<dl><dt><strong>host_ip</strong></dt> 72</dl> 73<dl><dt><strong>host_port</strong></dt> 74</dl> 75<dl><dt><strong>port_pairs</strong></dt> 76</dl> 77<dl><dt><strong>url</strong></dt> 78</dl> 79</td></tr></table> <p> 80<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 81<tr bgcolor="#ffc8d8"> 82<td colspan=3 valign=bottom> <br> 83<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> 84 85<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 86<td width="100%">Methods defined here:<br> 87<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> 88 <br> 89Args:<br> 90 port_pairs: A <a href="#PortPairs">PortPairs</a> instance that consists of a <a href="#PortPair">PortPair</a> mapping<br> 91 for each protocol. http is required. https and dns may be None.</tt></dd></dl> 92 93<hr> 94Data descriptors defined here:<br> 95<dl><dt><strong>__dict__</strong></dt> 96<dd><tt>dictionary for instance variables (if defined)</tt></dd> 97</dl> 98<dl><dt><strong>__weakref__</strong></dt> 99<dd><tt>list of weak references to the object (if defined)</tt></dd> 100</dl> 101<dl><dt><strong>does_forwarder_override_dns</strong></dt> 102</dl> 103<dl><dt><strong>host_ip</strong></dt> 104</dl> 105</td></tr></table> <p> 106<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 107<tr bgcolor="#ffc8d8"> 108<td colspan=3 valign=bottom> <br> 109<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> 110 111<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 112<td colspan=2><tt><a href="#PortPair">PortPair</a>(local_port, remote_port)<br> </tt></td></tr> 113<tr><td> </td> 114<td width="100%"><dl><dt>Method resolution order:</dt> 115<dd><a href="telemetry.internal.forwarders.html#PortPair">PortPair</a></dd> 116<dd><a href="__builtin__.html#tuple">__builtin__.tuple</a></dd> 117<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 118</dl> 119<hr> 120Methods defined here:<br> 121<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> 122 123<dl><dt><a name="PortPair-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Exclude the OrderedDict from pickling</tt></dd></dl> 124 125<dl><dt><a name="PortPair-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return a nicely formatted representation string</tt></dd></dl> 126 127<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> 128 129<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> 130 131<hr> 132Class methods defined here:<br> 133<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> 134 135<hr> 136Static methods defined here:<br> 137<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> 138 139<hr> 140Data descriptors defined here:<br> 141<dl><dt><strong>__dict__</strong></dt> 142<dd><tt>Return a new OrderedDict which maps field names to their values</tt></dd> 143</dl> 144<dl><dt><strong>local_port</strong></dt> 145<dd><tt>Alias for field number 0</tt></dd> 146</dl> 147<dl><dt><strong>remote_port</strong></dt> 148<dd><tt>Alias for field number 1</tt></dd> 149</dl> 150<hr> 151Data and other attributes defined here:<br> 152<dl><dt><strong>_fields</strong> = ('local_port', 'remote_port')</dl> 153 154<hr> 155Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<br> 156<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> 157 158<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> 159 160<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> 161 162<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> 163 164<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> 165 166<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> 167 168<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> 169 <br> 170Use of negative indices is not supported.</tt></dd></dl> 171 172<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> 173 174<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> 175 176<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> 177 178<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> 179 180<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> 181 182<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> 183 184<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> 185 186<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> 187 188<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> 189 190<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> 191 192<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> 193 194<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> 195Raises ValueError if the value is not present.</tt></dd></dl> 196 197</td></tr></table> <p> 198<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 199<tr bgcolor="#ffc8d8"> 200<td colspan=3 valign=bottom> <br> 201<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> 202 203<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 204<td colspan=2><tt><a href="#PortPairs">PortPairs</a>(http, https, dns)<br> </tt></td></tr> 205<tr><td> </td> 206<td width="100%"><dl><dt>Method resolution order:</dt> 207<dd><a href="telemetry.internal.forwarders.html#PortPairs">PortPairs</a></dd> 208<dd><a href="__builtin__.html#tuple">__builtin__.tuple</a></dd> 209<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 210</dl> 211<hr> 212Methods defined here:<br> 213<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> 214 215<dl><dt><a name="PortPairs-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Exclude the OrderedDict from pickling</tt></dd></dl> 216 217<dl><dt><a name="PortPairs-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return a nicely formatted representation string</tt></dd></dl> 218 219<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> 220 221<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> 222 223<hr> 224Class methods defined here:<br> 225<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> 226 227<hr> 228Static methods defined here:<br> 229<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> 230 231<hr> 232Data descriptors defined here:<br> 233<dl><dt><strong>__dict__</strong></dt> 234<dd><tt>Return a new OrderedDict which maps field names to their values</tt></dd> 235</dl> 236<dl><dt><strong>dns</strong></dt> 237<dd><tt>Alias for field number 2</tt></dd> 238</dl> 239<dl><dt><strong>http</strong></dt> 240<dd><tt>Alias for field number 0</tt></dd> 241</dl> 242<dl><dt><strong>https</strong></dt> 243<dd><tt>Alias for field number 1</tt></dd> 244</dl> 245<hr> 246Data and other attributes defined here:<br> 247<dl><dt><strong>_fields</strong> = ('http', 'https', 'dns')</dl> 248 249<hr> 250Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<br> 251<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> 252 253<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> 254 255<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> 256 257<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> 258 259<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> 260 261<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> 262 263<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> 264 <br> 265Use of negative indices is not supported.</tt></dd></dl> 266 267<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> 268 269<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> 270 271<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> 272 273<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> 274 275<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> 276 277<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> 278 279<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> 280 281<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> 282 283<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> 284 285<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> 286 287<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> 288 289<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> 290Raises ValueError if the value is not present.</tt></dd></dl> 291 292</td></tr></table></td></tr></table> 293</body></html>