java.lang.Object
net.i2p.router.web.helpers.ClientSKMDebugHelper

public class ClientSKMDebugHelperextends Object
Renders every client ratchet session key manager as one table, with a thead/tbody/tfoot section per client as on the update manager page, so the columns align across all clients. Inbound tag sets, outbound sessions and outbound tag sets share the column grid. Cells that do not apply to a row's kind show an em-dash. The tfoot carries the client's session counters. Clients whose SKM has no ratchet part (plain ElGamal) keep their own tag-status rendering below the table.
  • Method Details

    • render

      public static void render(RouterContext ctx, Writer out) throws IOException
      Write the consolidated table, one section per distinct client ratchet SKM (unwrapping the muxed variants), plus the legacy status section for each client whose SKM has no ratchet part (plain ElGamal).
      Parameters:
      ctx - the router context
      out - where to write
      Throws:
      IOException - if writing to out fails
    • buildSection

      static String buildSection(String title, List<String[]> rows, String summary)
      Build one thead/tbody/tfoot section with the default english columns and no peer rendering. Package-visible for testing.
      Parameters:
      title - the client title html
      rows - unified rows from RatchetSKM.getDebugRows()
      summary - the counters line, or null for no tfoot
      Returns:
      the section html, never null
    • buildSection

      static String buildSection(String title, List<String[]> rows, String summary, String columns, int peerCol, java.util.function.Function<String,String> peerRenderer)
      Build one thead/tbody/tfoot section. The title is pre-escaped html. The cell at peerCol is passed through peerRenderer (trusted html, e.g. a router-info reference) instead of being escaped. Package-visible for testing.
      Parameters:
      title - the client title html
      rows - unified rows from RatchetSKM.getDebugRows()
      summary - the counters line, or null for no tfoot
      columns - the translated header row html
      peerCol - index of the peer column, or -1 for none
      peerRenderer - renders the peer cell html, or null to escape it
      Returns:
      the section html, never null