class TunnelRenderer extends Object
| Constructor and Description |
|---|
TunnelRenderer(RouterContext ctx)TunnelRenderer. |
| Modifier and Type | Method and Description |
|---|---|
String | _t(String s,
Object o)translate a string |
(package private) static String | range(int f,
int t) |
void | renderGuide(Writer out)Renders an HTML table describing the bandwidth tiers used for tunnels,
including their ranges and labels, and writes the output to the provided Writer. |
void | renderLifetimeBandwidth(Writer out,
TunnelPool in,
TunnelPool outPool)renderLifetimeBandwidth. |
void | renderParticipating(Writer out,
boolean bySpeed)renderParticipating. |
void | renderPeerFragment(Writer out,
String id)Render a single named element for the contentonly fragment mode of the
tunnel peer count page: the "all peers" tbody with data-key rows, or
the totals footer row. |
void | renderPeers(Writer out)Render the tunnel peer count table, the "all peers" tbody, or the
totals footer row. |
void | renderStatusHTML(Writer out)renderStatusHTML. |
void | renderTransitSummary(Writer out)renderTransitSummary. |
public TunnelRenderer(RouterContext ctx)
static String range(int f, int t)
public void renderGuide(Writer out) throws IOException
out - the Writer to which the HTML content is writtenIOException - if an I/O error occurs during writingpublic void renderLifetimeBandwidth(Writer out, TunnelPool in, TunnelPool outPool) throws IOException
IOExceptionpublic void renderParticipating(Writer out, boolean bySpeed) throws IOException
IOExceptionpublic void renderPeerFragment(Writer out, String id) throws IOException
out - the writer to render toid - the element idIOException - if writing failspublic void renderPeers(Writer out) throws IOException
Full-page mode renders header, rows, and footer as one table; fragment mode (contentonly) renders just the named element so the page can refresh the tbody rows and footer without re-sending the full table.
IOExceptionpublic void renderStatusHTML(Writer out) throws IOException
IOExceptionpublic void renderTransitSummary(Writer out) throws IOException
IOException