java.lang.Object
net.i2p.router.web.ContextHelper

public class ContextHelperextends Object
Helper for accessing router contexts by context ID.
  • Constructor Details

    • ContextHelper

      public ContextHelper()
      Constructor. The only lookup is the static getContext(String), which reads the live context list, so an instance carries no state.
  • Method Details

    • getContext

      public static RouterContext getContext(String contextId)
      To take the first context in the list first context in the list.
      Parameters:
      contextId - base64 prefix of the target router hash, or null or blank
      Returns:
      the context whose router hash starts with contextId, otherwise the
      Throws:
      IllegalStateException - if no context available