java.lang.Object
net.i2p.router.web.ContextHelper
Helper for accessing router contexts by context ID.
Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionstatic RouterContextgetContext(String contextId) To take the first context in the list first context in the list.
Constructor Details
ContextHelper
public ContextHelper()Constructor. The only lookup is the staticgetContext(String), which reads the live context list, so an instance carries no state.
Method Details
getContext
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