Packages that use RouterContext
Package
Description
Low-level messages sent between routers - the Invisible Internet Network Protocol (I2NP).
Desktop GUI for monitoring and controlling the router from the system tray: status display, start/stop/restart controls and console access.
Router communication for the desktop GUI: status monitoring and control commands over I2CP (the Invisible Internet Client Protocol) and the router's service interfaces.
I2P Control service: a JSON-RPC 2.0 interface for controlling and monitoring the router from external applications, served over TLS on the configured port.
Request handling for the I2P Control JSON-RPC 2.0 service.
I2P Control JSON-RPC 2.0 method handlers: API version, router parameters, statistics and log access.
The I2P router application handles I2P network communication.
Router-side implementation of the Invisible Internet Client Protocol (I2CP): client sessions over plain or TLS sockets, message delivery, and lease and tunnel management on behalf of clients.
Router-specific cryptography: ElGamal+AES garlic encryption (ElGamalAESEngine), session key and tag caching for repeated peer communication (TransientSessionKeyManager), router-family shared keys (FamilyKeyCrypto), and the ratchet and pqc subpackages.
The Double Ratchet with X25519 key agreement and ECIES hybrid encryption, used by the NTCP2 and SSU transports for session encryption.
Simplified fake implementations of router interfaces (comm system and friends) for testing and embedded builds.
Garlic message creation, parsing and handling, and the outbound message jobs: one-shot sends, source routing and delivery status handling.
Network database message handling shared by all facades: database lookup jobs and local RouterInfo publication.
The Kademlia distributed hash table (DHT) network database: lookup, store and explore jobs, the data store, the floodfill variants, and lookup throttling.
Reseeding: fetching router info lists from reseed servers, web indexes or local files, validating them (signed SU3 update files and unsigned ZIP archives) and processing them to bootstrap into the network.
Peer profiles and capacity calculation, peer test jobs, peer selection for tunnel building, and the database and tunnel history used for peer selection.
The I2P startup package loads configuration when I2P is started.
Offline analysis tools for detecting Sybil attacks and malicious peer coordination by correlating peer relationships.
Periodic maintenance jobs: stats coalescing, cryptographic algorithm checks, liveliness marking, out-of-memory handling, thread dumps, the watchdog, graceful shutdown and soft restart, update installation, republishing and config reloading.
Transport framework: the transport lifecycle and pool management, connection handling and bandwidth throttling for the transports (NTCP2 over TCP, SSU over UDP) that carry I2P messages between routers, plus NAT traversal via UPnP and GeoIP country lookups.
NTCP2, the TCP transport: framed, ratchet-encrypted and mutually authenticated connections between routers.
SSU2, the UDP transport: datagram sessions with Holepunch peer discovery, plus the older SSU compatibility code.
Tunnel messages and the tunnel layer: the
TunnelManagerFacade, tunnel build request and reply processing, and the inbound and outbound tunnel structures. Tunnel pool management: pool lifecycle, peer selection, build scheduling and failure handling for client and exploratory tunnels.
Router-side update checking and installation: fetching update notifications, downloading and verifying updates, and staging them for the restart.
Router utility classes: CoDel active queue management, time-decaying collections, a diagnostics ring buffer, CIDR matching, and password management.
The router console user interface, implemented in routerconsole.jar, with these classes supporting the webapp in routerconsole.war.
Helpers and handlers for the router console user interface, packaged in routerconsole.war and accessible only from JSP files.
Router console servlets packaged in routerconsole.war, for pages that require servlet features rather than JSP helpers.
Servlet filters for I2P webapps: XSS protection and X-Forwarded header handling.
Uses of RouterContext in net.i2p.data.i2np
Methods in net.i2p.data.i2np with parameters of type RouterContextModifier and TypeMethodDescriptionBuildRequestRecord.encryptECIESRecord(RouterContext ctx, PublicKey toKey, Hash toPeer) Encrypts the record using ECIES.Constructors in net.i2p.data.i2np with parameters of type RouterContextModifierConstructorDescriptionBuildRequestRecord(RouterContext ctx, PrivateKey ourKey, EncryptedBuildRecord encryptedRecord) Decrypts an encrypted build request record.Uses of RouterContext in net.i2p.desktopgui
Fields in net.i2p.desktopgui declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextInternalTrayManager._contextThe router context.private final RouterContextMain._contextThe router context, null when running without a router.Constructors in net.i2p.desktopgui with parameters of type RouterContextModifierConstructorDescriptionInternalTrayManager(RouterContext ctx, Main main, boolean useSwing) Create a new InternalTrayManager with full router context access.Main(RouterContext ctx, ClientAppManager mgr) Construct the GUI bound to a running router, so it registers with the given client app manager and gets the router's context directly.Uses of RouterContext in net.i2p.desktopgui.router
Methods in net.i2p.desktopgui.router with parameters of type RouterContextModifier and TypeMethodDescriptionstatic voidRouterManager.cancelShutdown(RouterContext ctx) Cancel a graceful shutdown or restart.static longRouterManager.getShutdownTimeRemaining(RouterContext ctx) Get time until shutdown.static StringRouterManager.getStatus(RouterContext ctx) Get network status, untranslated.static booleanRouterManager.isShutdownInProgress(RouterContext ctx) Is a graceful shutdown or restart in progress?static voidRouterManager.restart(RouterContext ctx) Restart the running I2P instance immediately.static voidRouterManager.restartGracefully(RouterContext ctx) Restart the running I2P instance gracefully.static voidRouterManager.shutDown(RouterContext ctx) Stop the running I2P instance immediately.static voidRouterManager.shutDownGracefully(RouterContext ctx) Stop the running I2P instance gracefully.Uses of RouterContext in net.i2p.i2pcontrol
Fields in net.i2p.i2pcontrol declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextI2PControlController._contextThe router context, null when run standalone in an app context.private final RouterContextSocketController._contextThe router context, never null.Constructors in net.i2p.i2pcontrol with parameters of type RouterContextModifierConstructorDescriptionRouterApp (new way)SocketController(RouterContext ctx, ClientAppManager mgr) RouterApp (new way)Uses of RouterContext in net.i2p.i2pcontrol.servlets
Fields in net.i2p.i2pcontrol.servlets declared as RouterContextConstructors in net.i2p.i2pcontrol.servlets with parameters of type RouterContextModifierConstructorDescriptionJSONRPC2Servlet(RouterContext ctx, SecurityManager secMan) Plugin form: takes the host application's context and security manager, and creates no config file.Uses of RouterContext in net.i2p.i2pcontrol.servlets.jsonrpc2handlers
Fields in net.i2p.i2pcontrol.servlets.jsonrpc2handlers declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextAdvancedSettingsHandler._contextThe router whose settings are read and written.private final RouterContextNetworkSettingHandler._contextThe router being configured.private final RouterContextRouterInfoHandler._contextThe router context.private final RouterContextRouterManagerHandler._contextThe router being managed.Constructors in net.i2p.i2pcontrol.servlets.jsonrpc2handlers with parameters of type RouterContextModifierConstructorDescriptionAdvancedSettingsHandler(RouterContext ctx, JSONRPC2Helper helper) Constructor for advanced settings handler.NetworkSettingHandler(RouterContext ctx, JSONRPC2Helper helper) Retains the router context and helper used to manage the settings.RouterInfoHandler(RouterContext ctx, JSONRPC2Helper helper) Retains the router context and helper used to build the reply.RouterManagerHandler(RouterContext ctx, JSONRPC2Helper helper) Retains the router context and response helper used to serve the requests.Uses of RouterContext in net.i2p.router
Fields in net.i2p.router declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextBanlist._contextThe router context.private RouterContextBanLogger._contextThe router context.private final RouterContextBlocklist._contextThe router context.private final RouterContextClientMessagePool._contextThe router context the pool runs in.private final RouterContextInNetMessagePool._contextThe router context.private final RouterContextJobImpl._contextThe router context the job runs in.private final RouterContextJobQueue._contextThe router context.private final RouterContextJobQueueRunner._contextThe router context.private final RouterContextJobQueueScaler._contextThe router context.private final RouterContextJobTiming._contextSupplies the clock the times are taken on.private final RouterContextKeyManager._contextThe router context.private final RouterContextMessageHistory._contextThe router context.private final RouterContextMessageValidator._contextThe router validating messages.private final RouterContextOutNetMessage._contextThe router context.private final RouterContextOutNetMessagePool._contextThe router context the pool belongs to.private final RouterContextRouter._contextThe router context.protected final RouterContextRouterThrottleImpl._contextRouter context, used for the job queue, tunnel counts, bandwidth limits and rates.private final RouterContextStatisticsManager._contextThe router context.private final RouterContextTuner._contextThe router context supplying stats and config.private final RouterContextBandwidthHistory._ctxThe router context.private final RouterContextPersistentKeyRing._ctxThe context whose properties hold the keys.private final RouterContextRouterContext.CleanupTask._ctxThe context being cleaned up.protected final RouterContextTuner.BaseParam._ctxRouter context.private final RouterContextTuner.SystemHealth._ctxThe router being scored.Fields in net.i2p.router with type parameters of type RouterContextModifier and TypeFieldDescriptionprivate static final List<RouterContext> RouterContext._contextsAll live router contexts.Methods in net.i2p.router that return RouterContextModifier and TypeMethodDescriptionfinal RouterContextJobImpl.getContext()The router context that this job belongs to.Router.getContext()Non-null, but take care when accessing context items before runRouter() is called as the context will not be initialized.Methods in net.i2p.router that return types with arguments of type RouterContextModifier and TypeMethodDescription(package private) static List<RouterContext> RouterContext.getContexts()Same asRouterContext.listContexts()but package private and modifiable.static List<RouterContext> RouterContext.listContexts()Retrieve the list of router contexts currently instantiated in this JVM.Methods in net.i2p.router with parameters of type RouterContextModifier and TypeMethodDescriptionprivate static voidTuner.applyStartupTunables(Tuner.AutotuneConfig autotune, RouterContext ctx) Apply the configured values at startup, clamped to the tunable ranges enforced by MaxDispatchAgeParam / HandlerThreadPriorityParam.protected doubleTuner.BaseParam.getAdditionalEventCount(RouterContext ctx, String statName) Fetch the event count for an additional stat using the 60s period.protected doubleTuner.BaseParam.getAdditionalEventCountHourly(RouterContext ctx, String statName) Fetch the event count for an additional stat using the 1-hour period.protected doubleTuner.BaseParam.getAdditionalStat(RouterContext ctx, String statName) Fetch an additional stat value for cross-reference decisions.protected doubleTuner.BaseParam.getAdditionalStat5Min(RouterContext ctx, String statName) Fetch an additional stat value using the 5-minute average.protected doubleTuner.BaseParam.getAdditionalStatHourly(RouterContext ctx, String statName) Fetch an additional stat value using the 1-hour average.protected doubleTuner.BaseParam.getAdditionalStatLong(RouterContext ctx, String statName) Fetch an additional stat value using the 10-minute average.protected doubleTuner.BaseParam.getBuildSuccessRate(RouterContext ctx) Compute actual tunnel build success rate from event counts.protected doubleTuner.BaseParam.getCoDelDropEventCount(RouterContext ctx, String prefix) Fetch the total CoDel drop event count across all priority levels.private static PropertiesRouter.getConfig(RouterContext ctx, String filename) This does not use ctx.getConfigDir(), must provide a full path in filename Caller must synchronize.protected intTuner.BaseParam.getDefaultMax(RouterContext ctx) Effective default max — override for bandwidth-scaled params.protected intTuner.REDMaxThresholdParam.getDefaultMax(RouterContext ctx) protected intTuner.REDMinThresholdParam.getDefaultMax(RouterContext ctx) protected intTuner.SendPoolCapacityParam.getDefaultMax(RouterContext ctx) protected intTuner.BaseParam.getDefaultMin(RouterContext ctx) Effective default min — override for bandwidth-scaled params.protected intTuner.REDMaxThresholdParam.getDefaultMin(RouterContext ctx) Scale min/max/step with share bandwidth.protected intTuner.REDMinThresholdParam.getDefaultMin(RouterContext ctx) Scale min/max/step with share bandwidth.protected intTuner.SendPoolCapacityParam.getDefaultMin(RouterContext ctx) protected intTuner.BaseParam.getDefaultStep(RouterContext ctx) Effective default step — override for bandwidth-scaled params.protected intTuner.REDMaxThresholdParam.getDefaultStep(RouterContext ctx) protected intTuner.REDMinThresholdParam.getDefaultStep(RouterContext ctx) protected static intTuner.BaseParam.getHeavyTransitThreshold(RouterContext ctx) Transit bandwidth threshold for "heavy" — 80% of configured share bandwidth.private StringBanLogger.getIPFromContext(Hash hash, RouterContext context) IP address from banlist for the given hash.static intRouterThrottleImpl.getMaxProcessingTimeTuned(RouterContext ctx) The max processing time in effect, tuned value if set else config.protected doubleTuner.BaseParam.getMessageReceiverUtilization(RouterContext ctx) UDP message receiver pool utilization (0.0-1.0).static intRouterThrottleImpl.getMinBandwidthFloorPerTunnel(RouterContext ctx) Calculate a floor for per-tunnel bandwidth allocation based on participating tunnel count and total outbound bandwidth share.protected doubleTuner.BaseParam.getObservedRTT(RouterContext ctx, String primaryStat) Fetch observed RTT, falling back toudp.sendConfirmTimewhen the primary stat has no events (lightly loaded router).protected doubleTuner.AckFrequencyParam.getObservedStat(RouterContext ctx) protected doubleTuner.ActivityWindowParam.getObservedStat(RouterContext ctx) Observed stat, retained for the base-class contract and the console cross-reference only.protected abstract doubleTuner.BaseParam.getObservedStat(RouterContext ctx) Observed stat value used for autotuning.protected doubleTuner.BuildFirstHopTimeoutParam.getObservedStat(RouterContext ctx) protected doubleTuner.BuildHandlerMaxQueueParam.getObservedStat(RouterContext ctx) protected doubleTuner.BuildHandlerThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.BuildRequestTimeoutParam.getObservedStat(RouterContext ctx) protected doubleTuner.CodelIntervalParam.getObservedStat(RouterContext ctx) protected doubleTuner.CodelTargetParam.getObservedStat(RouterContext ctx) protected doubleTuner.ConcurrencyThrottleThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.CongestionAvoidanceGrowthParam.getObservedStat(RouterContext ctx) protected doubleTuner.ConnectTimeoutMultiplierParam.getObservedStat(RouterContext ctx) Read RTT stat as the basis for multiplier computation.protected doubleTuner.DataMessageTimeoutParam.getObservedStat(RouterContext ctx) protected doubleTuner.EDHPreCalcMinParam.getObservedStat(RouterContext ctx) protected doubleTuner.ExploreBredthParam.getObservedStat(RouterContext ctx) Read the observed stat for autotuning decisions.protected doubleTuner.FirstHopFailureCooldownParam.getObservedStat(RouterContext ctx) protected doubleTuner.FirstHopFailureThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.GoodDeficitThrottleParam.getObservedStat(RouterContext ctx) protected doubleTuner.HandlerThreadPriorityParam.getObservedStat(RouterContext ctx) protected doubleTuner.I2PTunnelClientMaxConnectionsParam.getObservedStat(RouterContext ctx) protected doubleTuner.I2PTunnelClientRunnerMaxParam.getObservedStat(RouterContext ctx) protected doubleTuner.I2PTunnelServerBacklogParam.getObservedStat(RouterContext ctx) Read the live aggregate queue depth across all server tunnel pools.protected doubleTuner.I2PTunnelServerHandlerThreadsParam.getObservedStat(RouterContext ctx) Read the live aggregate queue depth across all server tunnel pools.protected doubleTuner.I2PTunnelServerIOStallTimeoutParam.getObservedStat(RouterContext ctx) Observe the delta stall events since last tuning cycle.protected doubleTuner.I2PTunnelServerIOTransferParam.getObservedStat(RouterContext ctx) protected doubleTuner.I2PTunnelServerThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.IbEstablishTimeParam.getObservedStat(RouterContext ctx) protected doubleTuner.IbMsgsPerPumpParam.getObservedStat(RouterContext ctx) protected doubleTuner.ImmediateAckDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.InactivityTimeoutParam.getObservedStat(RouterContext ctx) protected doubleTuner.InitConcurrentMsgsParam.getObservedStat(RouterContext ctx) protected doubleTuner.InitialAckDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.InitialResendDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.InitialRTOParam.getObservedStat(RouterContext ctx) protected doubleTuner.InitialWindowSizeParam.getObservedStat(RouterContext ctx) protected doubleTuner.InitRTOParam.getObservedStat(RouterContext ctx) protected doubleTuner.InternalQueueSizeParam.getObservedStat(RouterContext ctx) protected doubleTuner.LeaseResendCountParam.getObservedStat(RouterContext ctx) protected doubleTuner.LookupLimitParam.getObservedStat(RouterContext ctx) protected doubleTuner.LossyThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.LsLookupTimeoutParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxConcurrentBuildsParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxConcurrentEstablishParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxConcurrentMessagesParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxDispatchAgeParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxFastPeersParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxHighCapPeersParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxInboundBufferParam.getObservedStat(RouterContext ctx) Observed stat: choke activations per 60s window.protected doubleTuner.MaxParticipatingTunnelsParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxProfilesParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxQueuedOutboundParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxResendDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxRetransmissionsParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxRTOParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxRttParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxSendWindowParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxSlowStartWindowParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxStreamsParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxSynResendsParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxWindowSizeParam.getObservedStat(RouterContext ctx) protected doubleTuner.MaxWriteBufsParam.getObservedStat(RouterContext ctx) protected doubleTuner.MessageProcessingThrottleParam.getObservedStat(RouterContext ctx) protected doubleTuner.MinConcurrentMsgsParam.getObservedStat(RouterContext ctx) protected doubleTuner.MinFastPeersParam.getObservedStat(RouterContext ctx) protected doubleTuner.MinHighCapPeersParam.getObservedStat(RouterContext ctx) protected doubleTuner.MinPacingRateParam.getObservedStat(RouterContext ctx) protected doubleTuner.MinResendDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.MinRTOParam.getObservedStat(RouterContext ctx) protected doubleTuner.MLKEMPreCalcMinParam.getObservedStat(RouterContext ctx) protected doubleTuner.NetDBMaxConcurrentParam.getObservedStat(RouterContext ctx) Deferred-search events this cycle, not the stat's mean value — the stat records the deferred search's remaining lifetime as its value, so the mean says nothing about how often the cap actually bound.protected doubleTuner.NetDBMaxSearchTimeParam.getObservedStat(RouterContext ctx) protected doubleTuner.NetDBSearchLimitParam.getObservedStat(RouterContext ctx) protected doubleTuner.NetDBSingleSearchTimeParam.getObservedStat(RouterContext ctx) protected doubleTuner.NtcpEstablishTimeParam.getObservedStat(RouterContext ctx) protected doubleTuner.NtcpFailsafeFreqParam.getObservedStat(RouterContext ctx) protected doubleTuner.NTCPQueueCapacityParam.getObservedStat(RouterContext ctx) protected doubleTuner.NtcpReaderThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.NtcpSendFinisherThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.NtcpWriterThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.ObEstablishTimeParam.getObservedStat(RouterContext ctx) protected doubleTuner.ObMsgsPerPumpParam.getObservedStat(RouterContext ctx) protected doubleTuner.OutboundMsgExpirationParam.getObservedStat(RouterContext ctx) protected doubleTuner.ParticipatingThrottleMaxParam.getObservedStat(RouterContext ctx) protected doubleTuner.ParticipatingThrottleMinParam.getObservedStat(RouterContext ctx) protected doubleTuner.ParticipatingThrottlePctParam.getObservedStat(RouterContext ctx) protected doubleTuner.PassiveFlushDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.PeerOutboundQueueParam.getObservedStat(RouterContext ctx) protected doubleTuner.PercentLookupLimitParam.getObservedStat(RouterContext ctx) protected doubleTuner.PerTunnelBweDivisorParam.getObservedStat(RouterContext ctx) protected doubleTuner.PoolBackoffMsParam.getObservedStat(RouterContext ctx) protected doubleTuner.PoolFailureThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.PostRTOWindowParam.getObservedStat(RouterContext ctx) protected doubleTuner.PumperIdleLpsParam.getObservedStat(RouterContext ctx) protected doubleTuner.PumperQueueCapacityParam.getObservedStat(RouterContext ctx) protected doubleTuner.PumperThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.RdnsPoolSizeParam.getObservedStat(RouterContext ctx) protected doubleTuner.REDMaxDropProbParam.getObservedStat(RouterContext ctx) protected doubleTuner.REDMaxThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.REDMinThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.ReplenishFrequencyParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestHighLoadCpuParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestHighLoadLagParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestLoadWeightParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestModerateLoadCpuParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestModerateLoadLagParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestRejectSteepnessParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestRejectThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestSustainedModerateLoadParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestThrottleBurstParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestThrottleMaxParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestThrottleMinParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequestThrottlePctParam.getObservedStat(RouterContext ctx) protected doubleTuner.RequeueTimeParam.getObservedStat(RouterContext ctx) protected doubleTuner.ResendTimeoutParam.getObservedStat(RouterContext ctx) protected doubleTuner.RiLookupTimeoutParam.getObservedStat(RouterContext ctx) protected doubleTuner.RTOMultiplierParam.getObservedStat(RouterContext ctx) protected doubleTuner.SelectorLoopDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.SendPoolCapacityParam.getObservedStat(RouterContext ctx) protected doubleTuner.SentMessagesCleanTimeParam.getObservedStat(RouterContext ctx) protected doubleTuner.SlowStartGrowthParam.getObservedStat(RouterContext ctx) protected doubleTuner.SocketConnectTimeoutParam.getObservedStat(RouterContext ctx) protected doubleTuner.StaleBuildThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.StreamingReceiveWorkersParam.getObservedStat(RouterContext ctx) Read the observed stat (receiveBacklogged avg per period).protected doubleTuner.TestJobMaxDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.TestJobMaxPeriodParam.getObservedStat(RouterContext ctx) protected doubleTuner.TestJobMaxQueuedParam.getObservedStat(RouterContext ctx) Denial events this cycle, not the stat's mean value — the stat is a counter, so its average is a constant 1 whenever anything was denied.protected doubleTuner.TestJobMinDelayParam.getObservedStat(RouterContext ctx) protected doubleTuner.TestJobMinPeriodParam.getObservedStat(RouterContext ctx) protected doubleTuner.ThrottleRejectExponentParam.getObservedStat(RouterContext ctx) protected doubleTuner.TimerThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.TransitLoadWeightParam.getObservedStat(RouterContext ctx) protected doubleTuner.TransitRejectSteepnessParam.getObservedStat(RouterContext ctx) protected doubleTuner.TransitRejectThresholdParam.getObservedStat(RouterContext ctx) protected doubleTuner.TransitThrottleFactorParam.getObservedStat(RouterContext ctx) protected doubleTuner.TunnelGrowthFactorParam.getObservedStat(RouterContext ctx) protected doubleTuner.TunnelIVFilterMParam.getObservedStat(RouterContext ctx) Entries in the last completed decay window, from the filter itself.protected doubleTuner.TunnelTargetBufferParam.getObservedStat(RouterContext ctx) protected doubleTuner.UDPHandlerThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.UdpMaxRtoParam.getObservedStat(RouterContext ctx) protected doubleTuner.UDPMessageReceiverThreadsParam.getObservedStat(RouterContext ctx) protected doubleTuner.UntestedMultiplierParam.getObservedStat(RouterContext ctx) protected doubleTuner.WestwoodDecayFactorParam.getObservedStat(RouterContext ctx) protected doubleTuner.WriterQueueSizeParam.getObservedStat(RouterContext ctx) protected doubleTuner.XDHPreCalcMinParam.getObservedStat(RouterContext ctx) protected doubleTuner.BaseParam.getPacketHandlerUtilization(RouterContext ctx) UDP packet handler pool utilization (0.0-1.0).protected doubleTuner.BaseParam.getPumperUtilization(RouterContext ctx) Tunnel pumper pool utilization (0.0-1.0).protected doubleTuner.BaseParam.getReaderUtilization(RouterContext ctx) NTCP reader pool utilization (0.0-1.0).protected doubleTuner.BaseParam.getSendFinisherUtilization(RouterContext ctx) NTCP send finisher pool utilization (0.0-1.0).protected static intTuner.BaseParam.getShareBps(RouterContext ctx) Current share bandwidth in bytes per second.protected doubleTuner.BaseParam.getStatPeriodStamp(RouterContext ctx, String statName) When the window behind a stat's event count last completed, in ms, or NaN when it cannot be determined.protected doubleTuner.BaseParam.getStreamingLossRate(RouterContext ctx) Recent streaming retransmission rate for this tuning cycle.protected static intTuner.BaseParam.getSustainedHeavyTransitThreshold(RouterContext ctx) Transit bandwidth threshold for "sustained heavy" — 50% of configured share.static intRouterThrottleImpl.getThrottleRejectExponent(RouterContext ctx) The throttle rejection-curve exponent, tuned value if set else therouter.throttleRejectExponentconfig, clamped to the caller's [3,20] validity window.static doubleRouterThrottleImpl.getTunnelGrowthFactorTuned(RouterContext ctx) The tunnel growth factor in effect, tuned value if set else config.protected doubleTuner.BaseParam.getWriterUtilization(RouterContext ctx) NTCP writer pool utilization (0.0-1.0).voidBanLogger.initialize(RouterContext context) Initialize the logger.static booleanRouterThrottleImpl.isShuttingDown(RouterContext context) Whether the router is shutting down.voidBanLogger.logBan(Hash hash, RouterContext context, String reason, long durationMs) Log a ban by hash withRouterContext(IP will be looked up from banlist).voidBanLogger.logBanForever(Hash hash, RouterContext context, String reason) Log a permanent ban with RouterContext.protected voidTuner.BaseParam.persistValue(RouterContext ctx, int value) Persist a tuned value to autotune.config.private voidTuner.purgeOldTunerProps(RouterContext ctx) Remove old tuner.* properties fromrouter.configthat were written there before autotune.config was introduced.voidTuner.BaseParam.refreshDefault(RouterContext ctx) Re-read the default value from autotune.config for live updates.voidTuner.BaseParam.refreshRanges(RouterContext ctx) Re-read min/max/step from autotune.config — live update, no restart.(package private) static booleanRouterContext.setGlobalContext(RouterContext ctx) The default context, unless there is one already.Constructors in net.i2p.router with parameters of type RouterContextModifierConstructorDescriptionLoad the autotune config for the given context.Create a bandwidth history.Banlist(RouterContext context) Seeds the entry maps, bans the known invalid hashes, and reads the config.BanLogger(RouterContext context) Constructor with context for immediate initialization.protectedBaseParam(String name, String description, String subsystem, int defaultMin, int defaultMax, int defaultStep, String statName, RouterContext ctx) A tunable parameter with the given name, description and subsystem.protectedBaseParam(String name, String description, String subsystem, int defaultMin, int defaultMax, int defaultStep, String statName, RouterContext ctx, Tuner.AutotuneConfig autotune) A tunable parameter with the given name, description and subsystem.protectedBaseParam(String name, String description, String subsystem, int defaultMin, int defaultMax, int defaultStep, String statName, RouterContext ctx, Tuner.AutotuneConfig autotune, int defaultValue) A tunable parameter with the given name, description and subsystem.Blocklist(RouterContext context) Constructor.Cleanup(RouterContext ctx) Creates the periodic banlist cleanup job.(package private)CleanupTask(RouterContext ctx) Prepares to clean up a dead context.ClientMessagePool(RouterContext context) Create a new ClientMessagePool.InNetMessagePool(RouterContext context) Message pool for processing inbound I2NP messages.JobImpl(RouterContext context) Create a new JobImpl.JobQueue(RouterContext context) Does not start the pumper.JobQueueRunner(RouterContext context, int id) Create a new job queue runner.JobQueueScaler(RouterContext context, JobQueue jobQueue) Create a new JobQueueScaler.JobTiming(RouterContext context) Create a JobTiming for the given context.KeyManager(RouterContext context) Create a key manager.MessageHistory(RouterContext context) Message history for the given context.MessageValidator(RouterContext context) Registers the duplicate and expiry rate stats the validator reports into.OutNetMessage(RouterContext context) Null msg and target, zero expiration (used in OutboundMessageRegistry only).OutNetMessage(RouterContext context, I2NPMessage msg, long expiration, int priority, RouterInfo target) Standard constructor.OutNetMessagePool(RouterContext context) Retains the context and opens the pool's log.Retains the context and loads any keys already persisted in the router config.RouterClock(RouterContext context) Does not start.RouterThrottleImpl(RouterContext context) Create a throttle and schedule the reset of the "starting up" tunnel status.Builds the shared data handling job.Builds the shared gateway handling job.StatisticsManager(RouterContext context) Captures the router context and prepares the number and percentage formatters.(package private)System health.Tuner(RouterContext ctx) The tuner with all tunable parameters.Uses of RouterContext in net.i2p.router.client
Fields in net.i2p.router.client declared as RouterContextModifier and TypeFieldDescriptionprotected final RouterContextClientConnectionRunner._contextRouter context.protected final RouterContextClientListenerRunner._contextRouter context.private final RouterContextClientManagerFacadeImpl._contextThe router running the clients.protected final RouterContextClientMessageEventListener._contextThe router context.private final RouterContextClientWriterRunner._contextThe router context the writer runs in.protected final RouterContextClientManager._ctxRouter context.Constructors in net.i2p.router.client with parameters of type RouterContextModifierConstructorDescriptionClientConnectionRunner(RouterContext context, ClientManager manager, Socket socket) Create a new runner against the given socket.ClientListenerRunner(RouterContext context, ClientManager manager, int port) Create a new client listener runner for the given port.ClientManager(RouterContext context, int port) Does not start the listeners.ClientManagerFacadeImpl(RouterContext context) Creates the facade without starting anything; callClientManagerFacadeImpl.startup()to listen for I2CP connections.ClientMessageEventListener(RouterContext context, ClientConnectionRunner runner, boolean enforceAuth) Create a new event listener for the given client connection.ClientWriterRunner(RouterContext ctx, ClientConnectionRunner runner) Creates a new client writer runner.CreateSessionJob(RouterContext context, SessionConfig config) Create a job to request tunnels and then a LeaseSet for one client session.DistributeLocal(RouterContext ctx, Destination toDest, ClientConnectionRunner to, ClientConnectionRunner from, Destination fromDest, Payload payload, MessageId id, long messageNonce) Distribute a message from one client connection directly to another.DoneJob(RouterContext enclosingContext) Builds the done job.LookupDestJob(RouterContext context, ClientConnectionRunner runner, long reqID, long timeout, SessionId sessID, Hash h, String name, Hash fromLocalDest) One of h or name non-null.LookupDestJob(RouterContext context, ClientConnectionRunner runner, Hash h, Hash fromLocalDest) Create a lookup job with the default timeout.MessageReceivedJob(RouterContext ctx, ClientConnectionRunner runner, Destination toDest, Destination fromDest, Payload payload, boolean sendDirect) Create a job that delivers one received message to a client.QueuedClientConnectionRunner(RouterContext context, ClientManager manager, I2CPMessageQueue queue) Create a new runner with the given queues.ReportAbuseJob(RouterContext context, ClientConnectionRunner runner, Destination dest, String reason, int severity) Create abuse report.RequestLeaseSetJob(RouterContext ctx, ClientConnectionRunner runner, LeaseRequestState state) Create the job.SSLClientListenerRunner(RouterContext context, ClientManager manager, int port) Creates an SSL listener on the given port, opening the client manager.Uses of RouterContext in net.i2p.router.crypto
Fields in net.i2p.router.crypto declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextFamilyKeyCrypto._contextThe router context.Constructors in net.i2p.router.crypto with parameters of type RouterContextUses of RouterContext in net.i2p.router.crypto.ratchet
Fields in net.i2p.router.crypto.ratchet declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextACKTimer._contextThe router the timer runs on.private final RouterContextECIESAEADEngine._contextThe router context.private final RouterContextElg2KeyFactory._contextThe router context.private final RouterContextMuxedEngine._contextThe router context the engine runs in.private final RouterContextMuxedPQEngine._contextThe router context the engine runs in.protected final RouterContextRatchetSKM._contextThe router context.Constructors in net.i2p.router.crypto.ratchet with parameters of type RouterContextModifierConstructorDescriptionACKTimer(RouterContext context, Destination from, Destination to) ACK timer for ratchet.Caller MUST callECIESAEADEngine.startup()to get threaded generation.Creates factory and starts background key precomputation thread.MuxedEngine(RouterContext ctx) Create the ratchet engine.Create the engine for the given router context.RatchetSKM(RouterContext context) For the router SKM only.RatchetSKM(RouterContext context, Destination dest) ECIES only.RatchetSKM(RouterContext context, Destination dest, EncType type) The session key manager is constructed and accessed through the client manager.Uses of RouterContext in net.i2p.router.dummy
Fields in net.i2p.router.dummy declared as RouterContextModifier and TypeFieldDescriptionprivate RouterContextDummyClientManagerFacade._contextThe router context the dummy facade reports on.private final RouterContextDummyNetworkDatabaseFacade._contextThe router context the facade belongs to.private final RouterContextVMCommSystem._contextThe router this transport serves.private RouterContextVMCommSystem.ReceiveJob._ctxThe receiving router's context.Constructors in net.i2p.router.dummy with parameters of type RouterContextModifierConstructorDescriptionInitializes this facade with the router context.Create an empty in-memory database; nothing is read from disk.Create a segmentor backed by a dummy network database facade.ReceiveJob(Hash from, byte[] msg, RouterContext us) Holds a message to deliver to a job.VMCommSystem(RouterContext context) Create a comm system.Uses of RouterContext in net.i2p.router.message
Fields in net.i2p.router.message declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextGarlicMessageHandler._contextThe router handling the message.private final RouterContextGarlicMessageParser._contextThe router context the parser runs in.private final RouterContextGarlicMessageReceiver._contextThe router receiving the message.private final RouterContextOutboundCache._contextThe router sending the messages.Methods in net.i2p.router.message with parameters of type RouterContextModifier and TypeMethodDescriptionprivate static PayloadGarlicConfigOutboundClientMessageJobHelper.buildAckClove(RouterContext ctx, Hash from, TunnelInfo replyToTunnel, long replyToken, long expiration, SessionKeyManager skm) Build a clove that sends a DeliveryStatusMessage to us.private static byte[]GarlicMessageBuilder.buildClove(RouterContext ctx, PayloadGarlicConfig config) Builds one clove's encrypted payload.private static byte[]GarlicMessageBuilder.buildCloveSet(RouterContext ctx, GarlicConfig config) Build the unencrypted GarlicMessage specified by the config.private static DeliveryStatusMessageOutboundClientMessageJobHelper.buildDSM(RouterContext ctx, long replyToken) Make a basic DSM.private static GarlicCloveGarlicMessageBuilder.buildECIESClove(RouterContext ctx, PayloadGarlicConfig config) Build a single clove.private static CloveSetGarlicMessageBuilder.buildECIESCloveSet(RouterContext ctx, GarlicConfig config) Build the unencrypted CloveSet specified by the config.static GarlicMessageGarlicMessageBuilder.buildECIESMessage(RouterContext ctx, GarlicConfig config) Encrypt from an anonymous source.(package private) static GarlicMessageGarlicMessageBuilder.buildECIESMessage(RouterContext ctx, GarlicConfig config, Hash from, Destination to, SessionKeyManager skm, ReplyCallback callback) ECIES_X25519 and PQ only.private static PayloadGarlicConfigOutboundClientMessageJobHelper.buildLeaseSetClove(RouterContext ctx, long expiration, LeaseSet replyLeaseSet) Build a clove that stores the leaseSet locally.static GarlicMessageGarlicMessageBuilder.buildMessage(RouterContext ctx, GarlicConfig config, Set<SessionTag> wrappedTags, PublicKey target, SessionKey encryptKey, SessionTag encryptTag) ELGAMAL_2048 only.static GarlicMessageGarlicMessageBuilder.buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, int numTagsToDeliver, int lowTagsThreshold, SessionKeyManager skm) ELGAMAL_2048 only.static GarlicMessageGarlicMessageBuilder.buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, int numTagsToDeliver, SessionKeyManager skm) ELGAMAL_2048 only Called by OCMJH.static GarlicMessageGarlicMessageBuilder.buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, SessionKeyManager skm) ELGAMAL_2048 only.static GarlicMessageGarlicMessageBuilder.buildMessage(RouterContext ctx, GarlicConfig config, SessionKey encryptKey, RatchetSessionTag encryptTag) Ratchet only.private static voidOutboundCache.cleanLeaseSetCache(RouterContext ctx, Map<OutboundCache.HashPair, LeaseSet> tc) Removes expired LeaseSets from the provided cache.private static voidOutboundCache.cleanLsFailCooldown(RouterContext ctx, Map<Hash, Long> cc) Removes expired LS fail cooldown entries.private static voidOutboundCache.cleanLsLastLookup(RouterContext ctx, Map<Hash, Long> mc) Prunes last-lookup timestamps older than two probe intervals.private static voidOutboundCache.cleanLsLastValid(RouterContext ctx, Map<Hash, Long> mc) Prunes last-valid timestamps older than the transient-gap grace window plus one cleanup interval (so a two-minute slack is kept).private static voidOutboundCache.cleanMultihomedCache(RouterContext ctx, Map<Hash, LeaseSet> mc) Removes expired LeaseSets from the multihomed cache.private static voidOutboundCache.cleanReplyCache(RouterContext ctx, Map<OutboundCache.HashPair, Long> tc) Removes stale entries from the last reply request cache.private static voidOutboundCache.cleanTunnelCache(RouterContext ctx, Map<OutboundCache.HashPair, TunnelInfo> tc) Removes invalid or expired TunnelInfo entries from the provided tunnel cache.private static GarlicConfigOutboundClientMessageJobHelper.createGarlicConfig(RouterContext ctx, long replyToken, long expiration, PublicKey recipientPK, PayloadGarlicConfig dataClove, Hash from, Destination dest, TunnelInfo replyTunnel, boolean requireAck, LeaseSet bundledReplyLeaseSet, SessionKeyManager skm) Make the top-level config, with a data clove, an optional ack clove, and an optional leaseset clove.(package private) static GarlicMessageOutboundClientMessageJobHelper.createGarlicMessage(RouterContext ctx, long replyToken, long expiration, PublicKey recipientPK, PayloadGarlicConfig dataClove, Hash from, Destination dest, TunnelInfo replyTunnel, int tagsToSendOverride, int lowTagsOverride, SessionKey wrappedKey, Set<SessionTag> wrappedTags, boolean requireAck, LeaseSet bundledReplyLeaseSet, ReplyCallback callback) Build a garlic message that will be delivered to the router on which the target is located.static voidOutboundClientMessageOneShotJob.init(RouterContext ctx) Called once at router startup.(package private) static booleanGarlicMessageBuilder.needsTags(RouterContext ctx, PublicKey key, Hash local, int minTagOverride) ELGAMAL_2048 only; returns false for others.private static GarlicMessageOutboundClientMessageJobHelper.wrapDSM(RouterContext ctx, SessionKeyManager skm, DeliveryStatusMessage dsm, long expiration) Wrap a DSM in a GarlicMessage, add the fake session to the SKM.Constructors in net.i2p.router.message with parameters of type RouterContextModifierConstructorDescriptionGarlicMessageHandler(RouterContext context) Create a handler that draws a fresh random message-ID XOR mask for each of the local, router and tunnel scopes.GarlicMessageHandler(RouterContext context, long msgIDBloomXorLocal, long msgIDBloomXorRouter, long msgIDBloomXorTunnel) Create a handler using fixed message-ID XOR masks, so the bloom filters can be primed identically across restarts.GarlicMessageParser(RouterContext context) Create a garlic message parser.GarlicMessageReceiver(RouterContext context, GarlicMessageReceiver.CloveReceiver receiver) Garlic message receiver that does not target a specific client destination.GarlicMessageReceiver(RouterContext context, GarlicMessageReceiver.CloveReceiver receiver, Hash clientDestination) Garlic message receiver targeting a specific client destination.HandleGarlicMessageJob(RouterContext context, GarlicMessage msg, RouterIdentity from, Hash fromHash, long msgIDBloomXorLocal, long msgIDBloomXorRouter, long msgIDBloomXorTunnel) Job to handle an inbound garlic message received outside of a tunnel.LookupLeaseSetFailedJob(RouterContext enclosingContext) Schedules handling of a failed lease set lookup.Creates an OutboundCache instance and schedules periodic cache cleanup.OutboundClientMessageOneShotJob(RouterContext ctx, OutboundCache cache, ClientMessage msg) Send it.SendJob(RouterContext enclosingContext) Schedules the actual send pass.SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, int timeoutMs, int priority) Send a message directly to a peer.SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, int timeoutMs, int priority, long msgIDBloomXor) Send a message directly to a peer with an XOR mask.SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, Job onSend, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority, long msgIDBloomXor) Send a message directly to a peer with full options.SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority) Send a message directly to a peer with reply handling.SendMessageDirectJob(RouterContext ctx, I2NPMessage message, Hash toPeer, ReplyJob onSuccess, Job onFail, MessageSelector selector, int timeoutMs, int priority, long msgIDBloomXor) Send a message directly to a peer with reply handling and XOR mask.Uses of RouterContext in net.i2p.router.networkdb
Constructors in net.i2p.router.networkdb with parameters of type RouterContextModifierConstructorDescriptionHandleDatabaseLookupMessageJob(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity _from, Hash _fromHash, long msgIDBloomXor) Creates a new HandleDatabaseLookupMessageJob.Sets up the job and its logger from the given router context.Uses of RouterContext in net.i2p.router.networkdb.kademlia
Fields in net.i2p.router.networkdb.kademlia declared as RouterContextModifier and TypeFieldDescriptionprivate static RouterContextFloodfillPeerSelector._cfgCtxContext the cached config values were read from.private static RouterContextKademliaNetworkDatabaseFacade._cfgCtxThe context of the cached settings.private final RouterContextBlindCache._contextThe router doing the lookups.private RouterContextFloodfillDatabaseLookupMessageHandler._contextThe router answering lookups.private RouterContextFloodfillDatabaseStoreMessageHandler._contextThe router context handling the store.private final RouterContextFloodfillNetworkDatabaseSegmentor._contextThe router context the segments live in.private final RouterContextFloodOnlyLookupSelector._contextThe router running the lookup.private final RouterContextIterativeLookupSelector._contextThe router running the lookup.protected final RouterContextKademliaNetworkDatabaseFacade._context_context.private final RouterContextNegativeLookupCache._contextThe router context.protected final RouterContextPeerSelector._context_context.private final RouterContextSearchMessageSelector._contextThe router context.private final RouterContextSearchState._contextThe router context.private final RouterContextStaleContactTrimmer._contextSupplies the clock and the peer list.private final RouterContextStoreState._contextThe router context.protected final RouterContextTransientDataStore._contextRouter context this store was constructed with.Methods in net.i2p.router.networkdb.kademlia with parameters of type RouterContextModifier and TypeMethodDescription(package private) static booleanFloodfillPeerSelector.addSameIPFingerprint(Set<Long> maskedIPs, Set<Integer> ports, Set<String> families, RouterContext ctx, Hash peer, RouterInfo pinfo, int mask) Fingerprint a candidate peer into the exclusion accumulators, adding compact masked-IP keys, ports, and the claimed family option.(package private) static intKademliaNetworkDatabaseFacade.bucketSize(RouterContext context) Bucket size (K) from the property, clamped to what KBucketSet accepts.private voidIterativeSearchJob.collectFingerprint(RouterContext ctx, Hash peer, int mask) Collect one candidate's fingerprint keys into the reusable scratch buffers, without claiming them.private intStartExplorersJob.determineNumExplorations(RouterContext ctx, int datastoreSize, long lag, long msgDelay, boolean highLoad) Dynamically determines the number of explorations to run based on system state.MessageWrapper.generateSession(RouterContext ctx, long expiration) Create a single key and tag, for receiving a single encrypted message, and register it with our router's session key manager, to expire in the time specified.MessageWrapper.generateSession(RouterContext ctx, SessionKeyManager skm, long expiration, boolean forceElG) Create a single key and tag, for receiving a single encrypted message, and register it with the client's session key manager, to expire in the time specified.MessageWrapper.generateSession(RouterContext ctx, Hash localDest, long expiration, boolean forceElG) Create a single key and tag, for receiving a single encrypted message, and register it with the client's session key manager, to expire in the time specified.private static booleanFloodfillPeerSelector.getEnableUnresponsiveFloodfillBan(RouterContext ctx) Reads the unresponsive floodfill ban setting.static intExploreJob.getExploreBredth(RouterContext ctx) The tuned exploratory breadth, or -1 when no tuned value has been applied.private static longRepublishLeaseSetJob.getLeaseViabilityWindow(RouterContext ctx) A lease is viable for a re-mint while it has at least this much time remaining: the re-sign request, floodfill propagation, and connection establishment all need the lease alive, and a tunnel closer to expiry than this is already inside the pool's proactive replacement window, so counting it would overstate the pool's health.static FilePersistentDataStore.getRouterInfoFile(RouterContext ctx, Hash hash) The persistent RI file for a hash.static intIterativeSearchJob.getSearchLimit(RouterContext ctx, int def) The search limit in effect, tuned value if set else config.static intIterativeSearchJob.getSingleSearchTime(RouterContext ctx, int def) The single search time in effect, tuned value if set else config.static booleanPersistentDataStore.isShuttingDown(RouterContext ctx) Check if the router is in a graceful or hard shutdown state.(package private) static longStaleContactTrimmer.lastSeen(RouterContext context, Hash peer) The newest contact evidence for a peer, 0 when there is none.private static RouterInfoIterativeSearchJob.lookupRIUnvalidated(RouterContext ctx, Hash peer) Look up a peer's RouterInfo in the router's main NetDb, skipping the full validation performed byNetworkDatabaseFacade.lookupRouterInfoLocally(Hash).private longIntroducerLookupJob.nextInterval(RouterContext ctx) Next cycle delay: CYCLE_INTERVAL with uniform ±CYCLE_JITTER.(package private) static booleanSearchJob.onlyQueryFloodfillPeers(RouterContext ctx) This is now misnamed, as it is only used to determine whether to return floodfill peers only.private static voidFloodfillPeerSelector.refreshConfig(RouterContext ctx) Refresh the cached configuration from properties at most once per CONFIG_REFRESH_MS, or immediately when the context changes.private static voidKademliaNetworkDatabaseFacade.refreshConfig(RouterContext ctx) Refresh the cached configuration from properties at most once per CONFIG_REFRESH_MS, or immediately when the context changes.static longIterativeSearchJob.reloadGracePeriod(RouterContext ctx) Reload grace period from properties (for dynamic tuning).private voidIntroducerLookupJob.requestLookup(RouterContext ctx, Hash h, long now, int timeoutMs) Record the attempt and issue one non-blocking remote RI lookup with the given deadline (never past this cycle's query budget, never above the standard adaptive RouterInfo lookup cap).private voidStartExplorersJob.scheduleNextRun(RouterContext ctx, long lag, long msgDelay, boolean highLoad) Schedules the next job run based on current load and configured delay properties.(package private) static MessageWrapper.WrappedMessageMessageWrapper.wrap(RouterContext ctx, I2NPMessage m, Hash from, RouterInfo to) Garlic wrap a message from a client or this router, destined for a router, to hide the contents from the OBEP.static GarlicMessageMessageWrapper.wrap(RouterContext ctx, I2NPMessage m, RouterInfo to) Garlic wrap a message from nobody, destined for a router, to hide the contents from the OBEP.static GarlicMessageMessageWrapper.wrap(RouterContext ctx, I2NPMessage m, SessionKey encryptKey, SessionTag encryptTag) Garlic wrap a message from nobody, destined for an unknown router, to hide the contents from the IBGW.static GarlicMessageMessageWrapper.wrap(RouterContext ctx, I2NPMessage m, SessionKey encryptKey, RatchetSessionTag encryptTag) Garlic wrap a message from nobody, destined for an unknown router, to hide the contents from the IBGW.static GarlicMessageMessageWrapper.wrap(RouterContext ctx, I2NPMessage m, MessageWrapper.OneTimeSession session) Garlic wrap a message from nobody, destined for an unknown router, to hide the contents from the IBGW.Constructors in net.i2p.router.networkdb.kademlia with parameters of type RouterContextModifierConstructorDescriptionRepublishes client lease sets in batches.BlindCache(RouterContext ctx) Caller MUST callBlindCache.startup()to load persistent cache from disk.(package private)Creates a new ContactDrivenRefreshJob.DirectLookupJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash peer, RouterInfo oldRI, Job onFind, Job onFail) Request is sent to; if null the job fails without sending anything.DirectLookupMatchJob(RouterContext ctx, FloodSearchJob job) Passes the context and search job up to the flood-only match job.DropLookupFailedJob(RouterContext ctx, Hash peer, RouterInfo _info) Job to drop the peer after a lookup timeout.DropLookupFoundJob(RouterContext ctx, Hash peer, RouterInfo info) Job to verify a failing peer after a successful lookup.ExpireLeasesJob(RouterContext ctx, KademliaNetworkDatabaseFacade facade) Opens the job log and remembers the facade whose leasesets are expired.ExpireRoutersJob(RouterContext ctx, KademliaNetworkDatabaseFacade facade) Expire outdated routers from the network database.ExploreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, boolean isRealExplore, long msgIDBloomXor) New exploratory search with the given parameters and calculated concurrency level.FailedJob(RouterContext enclosingContext, RouterInfo peer) Mark the peer as failed for this search.FailedJob(RouterContext enclosingContext, RouterInfo peer, boolean penalizePeer) Allow the choice as to whether failed searches should count against the peer (such as if we search for a random key).FailedJob(RouterContext enclosingContext, RouterInfo peer, long sendOn) Create a failed job for a peer.FloodFailedJob(RouterContext ctx, Hash peer) Record a failed store for the given peer.Handler for floodfill DatabaseLookupMessages.Create a handler for floodfill database store messages.FloodfillMonitorJob(RouterContext context, FloodfillNetworkDatabaseFacade facade) Creates a new FloodfillMonitorJob.Main DB.FloodfillNetworkDatabaseFacade(RouterContext context, Hash dbid) Sub DBs.New segmentor with the given RouterContext, containing a default, main netDb and prepared to add client netDbs.Binds the facade and prepares the ban logger.FloodfillRouterInfoFloodJob(RouterContext context, FloodfillNetworkDatabaseFacade facade) Stores the network database and the log the flood runs under.FloodfillStoreJob(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs) Create a new FloodfillStoreJob to send data to floodfills.FloodfillStoreJob(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip) Create a new FloodfillStoreJob to send data to floodfills.FloodfillVerifyStoreJob(RouterContext ctx, Hash key, Hash client, long published, int type, Hash sentTo, Set<Hash> toSkip, FloodfillNetworkDatabaseFacade facade) Delay, then confirm the store peer still holds the entry; after a longer delay, confirm a different floodfill got the flood.Match job for a flood-only search.FloodOnlyLookupSelector(RouterContext ctx, FloodOnlySearchJob search) Binds the selector to the search whose replies it matches.Remembers the flood search to fail on timeout.protectedFloodOnlySearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs) For DirectLookupJob extension, RI only, different match job.FloodOnlySearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease) Flood-only search for the given key against the floodfill network database.FloodSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease) Prepares a flood search for one key: records the target, the callbacks and the lease-set flag, then derives the deadline from the requested timeout, applied in full.FloodSuccessJob(RouterContext ctx, Hash peer) Record a successful store for the given peer.HandleFloodfillDatabaseLookupMessageJob(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash, long msgIDBloomXor) Creates a new job to handle a floodfill database lookup message.HandleFloodfillDatabaseStoreMessageJob(RouterContext ctx, DatabaseStoreMessage receivedMessage, RouterIdentity from, Hash fromHash, FloodfillNetworkDatabaseFacade facade, long msgIDBloomXor) Handle an incoming floodfill DatabaseStoreMessage.Constructor.IterativeFollowupJob(RouterContext ctx, Hash key, Hash to, IterativeSearchJob search) Queries one peer for a single key on behalf of an iterative search.IterativeLookupJob(RouterContext ctx, DatabaseSearchReplyMessage dsrm, IterativeSearchJob search) Chase the hashes from the received DatabaseSearchReplyMessage, starting a followup search for each.IterativeLookupSelector(RouterContext ctx, IterativeSearchJob search) Binds the selector to the iterative search whose replies it matches.IterativeSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease) Lookup using exploratory tunnels.IterativeSearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease, Hash fromLocalDest) Lookup using the client's tunnels.IterativeTimeoutJob(RouterContext ctx, Hash peer, IterativeSearchJob job) Create a timeout job for an iterative search.KademliaNetworkDatabaseFacade(RouterContext context, Hash dbid) Initializes the Kademlia-based network database facade.NegativeLookupCache(RouterContext context) Creates a new NegativeLookupCache.PeerSelector.PersistentDataStore(RouterContext ctx, String dbDir, KademliaNetworkDatabaseFacade facade) Creates a new persistent data store.ProbeStalePeerJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade) Stores the facade and logger, and empties the per-peer probe cooldown map.Refreshes the client lease sets periodically.RefreshRoutersJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade) Stores the network database and the log the refresh runs under.RepublishLeaseSetJob(RouterContext ctx, KademliaNetworkDatabaseFacade facade, Hash destHash) Creates a new job to republish a LeaseSet for the given destination.RequeuePending(RouterContext enclosingContext) Requeue job that re-invokes searchNext.SearchJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, Job onSuccess, Job onFailure, long timeoutMs, boolean keepStats, boolean isLease, long msgIDBloomXor) Create a new search for the routingKey specified.SearchMessageSelector(RouterContext context, RouterInfo peer, long expiration, SearchState state) Claims a selector id and records the peer, deadline and search state.SearchReplyJob(RouterContext enclosingContext, SearchJob job, DatabaseSearchReplyMessage message, Hash peer, long duration) Opens a log and clamps a non-positive duration to zero.SearchState(RouterContext context, Hash key) Opens the search's log, records the start time and initializes the peer-tracking sets.SearchUpdateReplyFoundJob(RouterContext context, RouterInfo peer, SearchState state, KademliaNetworkDatabaseFacade facade, SearchJob job) Create job with no tunnel info.SearchUpdateReplyFoundJob(RouterContext context, RouterInfo peer, SearchState state, KademliaNetworkDatabaseFacade facade, SearchJob job, TunnelInfo outTunnel, TunnelInfo replyTunnel) Create job with tunnel info for reply routing.SendSuccessJob(RouterContext enclosingContext, RouterInfo peer) Create a success job for direct delivery.SendSuccessJob(RouterContext enclosingContext, RouterInfo peer, TunnelInfo sendThrough, int size) Create a success job for tunnel delivery.Stores the reply whose router hashes this job will look up.SingleSearchJob(RouterContext ctx, Hash key, Hash to) Send one DatabaseLookupMessage straight to a chosen peer over exploratory tunnels, instead of flooding the networkDb with it.(package private)StaleContactTrimmer(RouterContext context) Evict stale entries using this context's clock and peer profiles.StartExplorersJob(RouterContext context, KademliaNetworkDatabaseFacade facade) Job to manage peer exploration scheduling.StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs) Send a data structure to the floodfills.StoreJob(RouterContext context, KademliaNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip) Send a data structure to the floodfills, skipping certain peers.StoreMessageSelector(RouterContext ctx, long storeJobId, RouterInfo peer, long waitingForId, long expiration) Creates a new message selector for database store confirmations.StoreState(RouterContext ctx, Hash key, DatabaseEntry data) Starts a store tracking no skipped peers.StoreState(RouterContext ctx, Hash key, DatabaseEntry data, Set<Hash> toSkip) New store state tracking pending, attempted, and successful peers.Build an empty volatile store, pre-sizing the entry map and the ban logger.Schedules handling of a verification reply.Schedules handling of a verification timeout.WaitJob(RouterContext enclosingContext) Creates the wait job for this router.Uses of RouterContext in net.i2p.router.networkdb.reseed
Fields in net.i2p.router.networkdb.reseed declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextReseedBundler._contextThe router building the bundle.private final RouterContextReseedChecker._contextThe router context.private final RouterContextReseeder._contextThe router context.Constructors in net.i2p.router.networkdb.reseed with parameters of type RouterContextModifierConstructorDescriptionHolds the router context used for netDb lookups and temp file access.ReseedChecker(RouterContext context) Opens a log for this router's reseed checker.(package private)Reseeder(RouterContext ctx, ReseedChecker rc) Holds context and checker references for reseed operations.StatusCleaner(RouterContext ctx, String status, String error) Clears the messages after a delay.Uses of RouterContext in net.i2p.router.peermanager
Fields in net.i2p.router.peermanager declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextDBHistory._contextThe router context.private final RouterContextPeerManager._contextThe router context.private final RouterContextPeerManagerFacadeImpl._contextThe router the manager runs on.private final RouterContextPeerProfile._contextThe router context.private final RouterContextProfileManagerImpl._contextThe router context the profiles belong to.private final RouterContextProfileOrganizer._contextThe router context.private final RouterContextProfilePersistenceHelper._contextThe router context.private final RouterContextTunnelHistory._contextThe router context.Methods in net.i2p.router.peermanager that return RouterContextModifier and TypeMethodDescription(package private) RouterContextPeerProfile.getContext()Helper for calculators.Methods in net.i2p.router.peermanager with parameters of type RouterContextModifier and TypeMethodDescriptionProfileOrganizer.fingerprints(RouterContext ctx, Hash peer, int mask) One peer's fingerprints: the masked IP the comm system recorded, the masked IP and port of every published address, and the family option.private static doubleSpeedCalculator.getBaseScore(RouterContext context, PeerProfile profile) The base speed score of the peer.private static doubleCapacityCalculator.getCachedDcap(RouterContext ctx) Get the D-cap penalty, cached to avoid repeated Double.parseDouble.private static doubleCapacityCalculator.getCachedEcap(RouterContext ctx) Get the E-cap penalty, cached to avoid repeated Double.parseDouble.private static doubleSpeedCalculator.getCongestionFactor(RouterContext context, PeerProfile profile) Factor scaling the score by the network congestion.intProfileOrganizer.getEffectiveCandidateSample(RouterContext ctx) The candidate-sample floor currently in effect, for logging.static floatProfileOrganizer.getLossyThreshold(RouterContext ctx) The lossy demotion threshold in effect, tuned value if set else config.static intProfileOrganizer.getMinCandidateSample(RouterContext ctx) Read the candidate-sample floor, honouring the configured override.static floatProfileOrganizer.getModerateLossyThreshold(RouterContext ctx) The moderate de-prioritization threshold in effect, read straight from config (there is no Tuner override, unlikeProfileOrganizer.getLossyThreshold(RouterContext)).(package private) static RouterInfoProfileOrganizer.lookupRouterInfoUnvalidated(RouterContext ctx, Hash peer) ProfileOrganizer.lookupRouterInfoUnvalidated(Hash)with the context passed in, so the fingerprint builder below is reachable from tests.(package private) static booleanProfileOrganizer.notRestricted(RouterContext ctx, Hash peer, MaskedIPSet ipSet, int mask) Subnet-diversity gate: does this peer pass the masked-subnet, port and family check, and if it does, claim its fingerprints so that no later peer sharing any one of them passes as well.Constructors in net.i2p.router.peermanager with parameters of type RouterContextModifierConstructorDescriptionDBHistory(RouterContext context, String statGroup) Creates the lookup and invalid-reply rate statistics for one peer.(package private)PeerData(RouterContext ctx, Hash peerHash) Creates a new PeerData instance by looking up all necessary information.PeerManager(RouterContext context) Profiles are now loaded in a separate thread, so this should return quickly.Opens this facade's log and builds the profile persistence helper and peer tester.PeerProfile(RouterContext context, Hash peer) Caller should callPeerProfile.setLastHeardAbout(long)andPeerProfile.setFirstHeardAbout(long).privatePeerProfile(RouterContext context, Hash peer, boolean expand) Caller should callPeerProfile.setLastHeardAbout(long)andPeerProfile.setFirstHeardAbout(long).PeerReplyFoundJob(RouterContext context, RouterInfo peer, TunnelInfo replyTunnel, TunnelInfo sendTunnel) Starts the clock when the tested peer's reply arrived.PeerReplyTimeoutJob(RouterContext context, RouterInfo peer, TunnelInfo replyTunnel, TunnelInfo sendTunnel, PeerTestJob.ReplySelector sel) Schedules timeout handling when no reply arrived in time.PeerTestJob(RouterContext context) Creates a new PeerTestJob instance and initializes required statistics.ProfileManagerImpl(RouterContext context) Creates the manager and its logger from the given context.ProfileOrganizer(RouterContext context) Creates a profile organizer with empty tier maps and registers performance tracking statistics for peer classification.Construct a helper that reads and writes peer profiles under the router directory.TunnelHistory(RouterContext context, String statGroup) Creates the per-peer reject and fail rate stats.Uses of RouterContext in net.i2p.router.startup
Fields in net.i2p.router.startup declared as RouterContextModifier and TypeFieldDescriptionprotected final RouterContextLoadClientAppsJob.DelayedRunClient._ctxThe router context used to start the app when this event fires.private final RouterContextLoadClientAppsJob.RunApp._ctxThe router context.Methods in net.i2p.router.startup with parameters of type RouterContextModifier and TypeMethodDescriptionprivate static CertificateCreateRouterInfoJob.createCertificate(RouterContext ctx, SigningPublicKey spk, PublicKey pk) Only called at startup viaLoadRouterInfoJoband RebuildRouterInfoJob.static List<ClientAppConfig> ClientAppConfig.getClientApps(RouterContext ctx) Go through the files, and return a List of ClientAppConfig structures This is for the router.(package private) static longCreateRouterInfoJob.getCurrentPublishDate(RouterContext context) We probably don't want to expose the exact time at which a router published its info.static EncTypeCreateRouterInfoJob.getEncTypeConfig(RouterContext ctx) The configured EncType to expect on read-in.static SigTypeCreateRouterInfoJob.getSigTypeConfig(RouterContext ctx) The configured SigType to expect on read-in.static voidMigrateJetty.migrate(RouterContext ctx, List<ClientAppConfig> apps) For each entry in apps, if the main class is an old Jetty class, migrate it to the new Jetty class, and update the Jetty config files.static voidLoadClientAppsJob.runClient(String className, String clientName, String[] args, RouterContext ctx, Log log) Run client in a new thread.static voidLoadClientAppsJob.runClient(String className, String clientName, String[] args, RouterContext ctx, Log log, ThreadGroup threadGroup, ClassLoader cl) Run client in a new thread.Constructors in net.i2p.router.startup with parameters of type RouterContextModifierConstructorDescriptionBootCommSystemJob(RouterContext context) Create a new BootCommSystemJob.Create a new BootNetworkDbJob.Create a new BootPeerManagerJob.BuildTrustedLinksJob(RouterContext context, Job next) Create a new trusted links job.(package private)CreateRouterInfoJob(RouterContext ctx, Job next) Creates a new CreateRouterInfoJob.DelayedRunClient(SimpleTimer2 pool, RouterContext enclosingContext, String className, String clientName, String[] args) Caller must call schedule() before this event fires.DelayedRunClient(SimpleTimer2 pool, RouterContext enclosingContext, String className, String clientName, String[] args, ThreadGroup threadGroup, ClassLoader cl) Caller must call schedule() before this event fires.Creates the job that loads and starts the configured client apps.Opens the job's log and initializes the ban logger.RebuildRouterInfoJob(RouterContext context) Creates the job and opens its log.Opens the client map and registers a shutdown task.RunApp(String className, String appName, String[] args, RouterContext ctx, Log log, ClassLoader cl) Creates the runnable that loads and starts one client application class.StartAcceptingClientsJob(RouterContext context) Hands the router context to the superclass.StartupJob(RouterContext context) Passes the router context on to the JobImpl superclass.(package private)WaitForRunningClient(SimpleTimer2 pool, RouterContext enclosingContext, String className, String clientName, String[] args) Builds the netdb wait job.Uses of RouterContext in net.i2p.router.sybil
Fields in net.i2p.router.sybil declared as RouterContextMethods in net.i2p.router.sybil with parameters of type RouterContextModifier and TypeMethodDescriptionstatic AnalysisAnalysis.getInstance(RouterContext ctx) Singleton Analysis instance, creating it if necessary.Constructors in net.i2p.router.sybil with parameters of type RouterContextModifierConstructorDescriptionprivateAnalysis(RouterContext ctx, ClientAppManager mgr, String[] args) UseAnalysis.getInstance(RouterContext)instead.Uses of RouterContext in net.i2p.router.tasks
Fields in net.i2p.router.tasks declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextGracefulShutdown._contextThe router being shut down.private final RouterContextOOMListener._contextThe router context to log and act on.private final RouterContextRepublish._contextThe router whose router info is republished.private final RouterContextRestarter._contextThe router to restart.private final RouterContextRouterWatchdog._contextThe router context.private final RouterContextShutdownHook._contextThe router being shut down.private final RouterContextCoalesceStatsEvent._ctxThe router whose stats are coalesced.Methods in net.i2p.router.tasks with parameters of type RouterContextModifier and TypeMethodDescriptionprivate static voidInstallUpdate.deleteJbigiFiles(RouterContext context) Remove extracted libjbigi.so and libjcpuid.so files if we have a newer jbigi.jar, so the new ones will be extracted.private static voidInstallUpdate.deleteListedFiles(RouterContext context) Delete all files listed in the delete file.static StringOOMListener.getWrapperConfigPath(RouterContext ctx) The best guess path for the wrapper.config file.private static booleanOOMListener.isDebianPackage(RouterContext ctx) Best guess if running from a Debian package.static voidCryptoChecker.warnUnavailableCrypto(RouterContext ctx) Check and warn about unavailable cryptographic algorithms.Constructors in net.i2p.router.tasks with parameters of type RouterContextModifierConstructorDescriptionCreate a new stats coalescence event.Create a new graceful shutdown handler.OOMListener(RouterContext ctx) Create a new out-of-memory event listener.Create a new router info persistence job.Create a new configuration reader job.Republish(RouterContext ctx) Create a new router info republisher.Restarter(RouterContext ctx) Create a new router restarter.Create a new router watchdog.Create a new shutdown hook for emergency router shutdown.Create a new routing key modifier update job.Uses of RouterContext in net.i2p.router.transport
Fields in net.i2p.router.transport declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextCommSystemFacadeImpl._contextThe router context.private final RouterContextCountryLookup._contextThe router context.private final RouterContextFIFOBandwidthLimiter._contextThe router context.private final RouterContextFIFOBandwidthRefiller._contextThe router context.private final RouterContextOutboundMessageRegistry._contextThe router sending the messages.private final RouterContextPeerHTMLRenderer._contextRemoves the leading D/E/G bandwidth marker from a visible capacity string.private final RouterContextReverseDnsLookup._contextThe router context.protected final RouterContextTransportImpl._contextThe router context, which every subclass reads its configuration from.private final RouterContextTransportManager._contextThe router context.private final RouterContextUPnPManager._contextThe router context.Methods in net.i2p.router.transport that return RouterContextMethods in net.i2p.router.transport with parameters of type RouterContextModifier and TypeMethodDescriptionstatic voidGeoIP.banCountry(RouterContext ctx, String country) Bans routers located in a specified country.(package private) static voidGetBidsJob.fail(RouterContext context, OutNetMessage msg) Fail a message and trigger failure callbacks.(package private) static voidGetBidsJob.getBids(RouterContext context, TransportManager tmgr, OutNetMessage msg) Transport bids for a message and send it if a suitable bid is found.static TransportUtil.IPv6ConfigTransportUtil.getIPv6Config(RouterContext ctx, String transportStyle) The IPv6 config for the given transport style.static intTransportImpl.getTransportMaxConnections(RouterContext ctx, String style) The transport max connections for the given context and style.static booleanTransportUtil.isIPv4Firewalled(RouterContext ctx) This returns true if the force-firewalled setting is configured, false otherwise.static booleanTransportUtil.isIPv6Firewalled(RouterContext ctx) This returns true if the force-firewalled setting is configured, false otherwise.static booleanTransportManager.isNTCPEnabled(RouterContext ctx) Whether the NTCP transport is enabled.static intTransportUtil.selectRandomPort(RouterContext ctx, String transportStyle) Pick a random port between the configured boundaries.(package private) static booleanCountryLookup.supportsIPv4(RouterContext ctx) Check if we support outbound IPv4 connections.(package private) static booleanCountryLookup.supportsIPv6(RouterContext ctx) Check if we support outbound IPv6 connections.Constructors in net.i2p.router.transport with parameters of type RouterContextModifierConstructorDescriptionCommSystemFacadeImpl(RouterContext context) Build the transport manager, GeoIP database and address lookup services.CountryLookup(RouterContext ctx, GeoIP geoIP) Create a lookup over the netDb's router IPs, backed by the GeoIP database.FIFOBandwidthLimiter(RouterContext context) Creates a limiter with empty queues and starts the background refiller.(package private)FIFOBandwidthRefiller(RouterContext context, FIFOBandwidthLimiter limiter) Refiller keeping the given limiter's queues full.OutboundMessageRegistry(RouterContext context) Builds the empty selector tables and creates the expiry cleanup task.PeerHTMLRenderer(RouterContext ctx, CountryLookup countryLookup, ReverseDnsLookup rdns) Create a renderer.ReverseDnsLookup(RouterContext ctx, GeoIP geoIP) Create the resolver and its background executor.TransportImpl(RouterContext context) Initialize the new transport.TransportManager(RouterContext context) Manager for all enabled transports.UPnPManager(RouterContext context, TransportManager manager) Set up UPnP discovery and hold the transport manager to notify.Uses of RouterContext in net.i2p.router.transport.ntcp
Fields in net.i2p.router.transport.ntcp declared as RouterContextModifier and TypeFieldDescriptionprotected final RouterContextEstablishBase._contextRouter context, supplied to the subclass that constructs this.private final RouterContextEventPumper._contextThe router context.private final RouterContextNTCPConnection._contextThe router running this transport.private final RouterContextOutboundNTCP2State._contextThe router context.private final RouterContextReader._contextThe router context.Methods in net.i2p.router.transport.ntcp with parameters of type RouterContextModifier and TypeMethodDescription(package private) static byte[][]OutboundNTCP2State.generateSipHashKeys(RouterContext ctx, HandshakeState state) KDF for SipHash.Constructors in net.i2p.router.transport.ntcp with parameters of type RouterContextModifierConstructorDescriptionprotectedEstablishBase(RouterContext ctx, NTCPTransport transport, NTCPConnection con) Binds the context, transport and connection, sizing the padding buffer.EventPumper(RouterContext ctx, NTCPTransport transport) Create the pump for a transport, registering the rate stats it writes.InboundEstablishState(RouterContext ctx, NTCPTransport transport, NTCPConnection con) Creates a new InboundEstablishState for the given context, transport, and connection.NTCPConnection(RouterContext ctx, NTCPTransport transport, SocketChannel chan, SelectionKey key) Create an inbound connected (though not established) NTCP connection.privateNTCPConnection(RouterContext ctx, NTCPTransport transport, RouterAddress remAddr, boolean isIn) Base constructor for an inbound or outbound connection.NTCPConnection(RouterContext ctx, NTCPTransport transport, RouterIdentity remotePeer, RouterAddress remAddr, int version) Create an outbound unconnected NTCP connection.NTCPTransport(RouterContext ctx, X25519KeyFactory xdh) Registers the NTCP rate statistics and loads or creates the NTCP2 static keys; nothing is started untilNTCPTransport.startListening().OutboundNTCP2State(RouterContext ctx, NTCPTransport transport, NTCPConnection con) Create a new outbound NTCP2 state.Reader(RouterContext ctx) Reader thread pool for the given context.Writer(RouterContext ctx) Writer thread pool for the given context.Uses of RouterContext in net.i2p.router.transport.udp
Fields in net.i2p.router.transport.udp declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextEstablishmentManager._contextThe router context.protected final RouterContextInboundEstablishState._contextRouter context.private final RouterContextInboundMessageFragments._contextThe router receiving the datagrams.private final RouterContextInboundMessageState._contextThe router context.private final RouterContextIntroductionManager._contextThe router context.private final RouterContextMessageReceiver._contextThe router context.protected final RouterContextOutboundEstablishState._contextThe router context.private final RouterContextOutboundMessageFragments._contextThe router context.private final RouterContextPacketBuilder2._contextThe router context.private final RouterContextPacketHandler._contextThe router context.protected final RouterContextPeerState._contextThe router context.private final RouterContextPeerStateDestroyed._contextThe router context.private final RouterContextPeerTestEvent._contextRouter context.private final RouterContextPeerTestManager._contextThe router context.private final RouterContextUDPEndpoint._contextThe router context.private RouterContextUDPPacket._contextThe router context.private final RouterContextUDPReceiver._contextThe router context.private final RouterContextUDPSender._contextThe router context.(package private) static RouterContextUDPPacket.PacketFactory.contextI2P context for logging.Methods in net.i2p.router.transport.udp with parameters of type RouterContextModifier and TypeMethodDescriptionstatic UDPPacketUDPPacket.acquire(RouterContext ctx, boolean inbound) Inbound flag.static intEstablishmentManager.getMaxConcurrentEstablishTuned(RouterContext ctx) The max concurrent establish in effect, tuned value if set else config.static intPeerState.getOutboundQueueSize(RouterContext ctx, int def) Outbound message queue depth per peer.private voidUDPPacket.init(RouterContext ctx) Initialize or reset the packet state for reuse.static voidPeerState.loadConfig(RouterContext ctx) Load configurable UDP transport parameters fromrouter.config.Constructors in net.i2p.router.transport.udp with parameters of type RouterContextModifierConstructorDescriptionEstablishmentManager(RouterContext ctx, UDPTransport transport) Creates the establishment manager.protectedInboundEstablishState(RouterContext ctx, InetSocketAddress addr) For SSU2.InboundEstablishState2(RouterContext ctx, UDPTransport transport, UDPPacket packet) Start a new handshake with the given incoming packet, which must be a Session Request or Token Request.InboundMessageFragments(RouterContext ctx, OutboundMessageFragments outbound, UDPTransport transport) Creates the message receiver and registers the fragment reassembly stats.InboundMessageState(RouterContext ctx, long messageId, Hash from) Creates a new InboundMessageState with no fragments.InboundMessageState(RouterContext ctx, long messageId, Hash from, byte[] data, int off, int len, int fragmentNum, boolean isLast) Creates an InboundMessageState and stores the first received fragment.IntroductionManager(RouterContext ctx, UDPTransport transport) Creates the introduction manager.MessageReceiver(RouterContext ctx, UDPTransport transport) Creates the completed-message queue, sized from available memory, and registers its rate stats.protectedOutboundEstablishState(RouterContext ctx, RemoteHostId claimedAddress, RemoteHostId remoteHostId, RouterIdentity remotePeer, boolean needIntroduction, SessionKey introKey, UDPAddress addr) For SSU2.OutboundEstablishState2(RouterContext ctx, UDPTransport transport, RemoteHostId claimedAddress, RemoteHostId remoteHostId, RouterIdentity remotePeer, boolean needIntroduction, SessionKey introKey, RouterAddress ra, UDPAddress addr, int version) Prepare to start a new handshake with the given peer.OutboundMessageFragments(RouterContext ctx, UDPTransport transport) Registers the transport's send-rate and memory statistics.PacketBuilder2(RouterContext ctx, UDPTransport transport) No state, all methods are thread-safe.(package private)PacketHandler(RouterContext ctx, UDPTransport transport, EstablishmentManager establisher, InboundMessageFragments inbound, PeerTestManager testManager, IntroductionManager introManager) Create a new packet handler.PacketPusher(RouterContext ctx, OutboundMessageFragments fragments, List<UDPEndpoint> endpoints) Creates the packet pusher.protectedPeerState(RouterContext ctx, UDPTransport transport, InetSocketAddress addr, Hash remotePeer, boolean isInbound, int rtt) For SSU2.PeerState2(RouterContext ctx, UDPTransport transport, InetSocketAddress remoteAddress, Hash remotePeer, boolean isInbound, int rtt, CipherState sendCha, CipherState rcvCha, long sendID, long rcvID, byte[] sendHdrKey1, byte[] sendHdrKey2, byte[] rcvHdrKey2) A session with a remote peer over SSU2: the connection ids, the four cipher states and the header encryption keys are all fixed here, so the transport can build one without a separate handshake step.PeerStateDestroyed(RouterContext ctx, UDPTransport transport, PeerState2 peer) This must be called after the first termination or termination ack was sent fromPeerState2, so the next packet number is correct.PeerStateDestroyed(RouterContext ctx, UDPTransport transport, RemoteHostId id, long sendID, long rcvID, CipherState sendCha, CipherState rcvCha, byte[] sendKey1, byte[] sendKey2, byte[] rcvKey2, int reason) Direct from IES2, there was never a PS2.(package private)PeerTestEvent(RouterContext ctx, UDPTransport udp, PeerTestManager ptmgr) Peer test event.PeerTestManager(RouterContext context, UDPTransport transport) Have seen peer tests (as Alice) get stuck (_currentTest != null) so I've thrown some synchronizization on the methods; don't know the root cause or whether this fixes it.UDPEndpoint(RouterContext ctx, UDPTransport transport, int listenPort, InetAddress bindAddress) Record the settings a laterUDPEndpoint.startup()binds the UDP socket with.privateUDPPacket(RouterContext ctx) Used by the packet cache factory.UDPReceiver(RouterContext ctx, UDPTransport transport, DatagramSocket socket, String name, SocketListener lsnr) Constructor name parameter.UDPSender(RouterContext ctx, DatagramSocket socket, String name, SocketListener lsnr) Create a UDPSender with the given context, socket, name, and endpoint listener.UDPTransport(RouterContext ctx, X25519KeyFactory xdh) Create the UDP transport for the given router context and SSU2 XDH factory.Uses of RouterContext in net.i2p.router.tunnel
Fields in net.i2p.router.tunnel declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextBloomFilterIVValidator._contextThe router doing the validating.protected final RouterContextFragmentHandler._contextThe router context.private final RouterContextInboundEndpointProcessor._contextThe router ending the tunnel.private final RouterContextInboundGatewayReceiver._contextThe router context.private final RouterContextInboundMessageDistributor._contextThe router the tunnel terminates on.private final RouterContextOutboundMessageDistributor._contextThe router context.private final RouterContextOutboundReceiver._contextThe router context.private final RouterContextOutboundTunnelEndpoint._contextThe router context.protected final RouterContextTrivialPreprocessor._contextThe router context.protected final RouterContextTunnelCreatorConfig._contextThe router context.private final RouterContextTunnelDispatcher._contextThe router context.protected final RouterContextTunnelGateway._contextThe router context.private final RouterContextTunnelGatewayPumper._contextThe router context.private final RouterContextTunnelParticipant._contextThe router context.private final RouterContextBloomFilterIVValidator.IVFilterSizer._ctxThe router the validator runs on.Methods in net.i2p.router.tunnel with parameters of type RouterContextModifier and TypeMethodDescriptionprivate voidInboundEndpointProcessor.decrypt(RouterContext ctx, TunnelCreatorConfig cfg, byte[] orig, int offset, int length) Iteratively undo the crypto that the various layers in the tunnel added.(package private) booleanRateStatMeanBatch.flush(RouterContext ctx, String name) Emit one sample covering everything accumulated so far and start over.(package private) booleanRateStatMeanBatch.flushWithEventDuration(RouterContext ctx, String name) AsRateStatMeanBatch.flush(RouterContext, String), but records the accumulated event durations against the rate as well.static intTunnelDispatcher.getPerTunnelBweDivisor(RouterContext ctx) The per-tunnel bandwidth divisor in effect, tuned value if set elserouter.tunnel.perTunnelBweDivisorconfig, else the derived default of min(max tunnels, 100).static intTunnelDispatcher.getShareBandwidth(RouterContext ctx) The current bandwidth share in KBps.static floatTunnelDispatcher.getTransitThrottleFactor(RouterContext ctx, float def) The transit throttle factor in effect, tuned value if set else config.Constructors in net.i2p.router.tunnel with parameters of type RouterContextModifierConstructorDescriptionBatchedPreprocessor(RouterContext ctx, String name) Create a new preprocessor for batched tunnel messages.BatchedRouterPreprocessor(RouterContext ctx, HopConfig cfg) Create a preprocessor for inbound gateway tunnels.Create a preprocessor for outbound gateway tunnels.BloomFilterIVValidator(RouterContext ctx, int KBps) Construct the validator, choosing a starting filter size from the configured share and the heap, then leaving the size to be retuned from measured load.DistributeJob(RouterContext ctx, I2NPMessage msg, Hash target, TunnelId id) Builds the distribution job.Found(RouterContext ctx) Binds the router context.FragmentHandler(RouterContext context, FragmentHandler.DefragmentedReceiver receiver) For unit tests only, others use 3-arg constructor.FragmentHandler(RouterContext context, FragmentHandler.DefragmentedReceiver receiver, boolean isInbound) Binds the given context and receiver, storing the inbound flag.InboundEndpointProcessor(RouterContext ctx, TunnelCreatorConfig cfg, IVValidator validator) Binds the router context, tunnel creator config, and IV validator.InboundGatewayReceiver(RouterContext ctx, HopConfig cfg) Binds the router context and hop configuration.InboundMessageDistributor(RouterContext ctx, Hash client) Create a new inbound message distributor.IVFilterSizer(BloomFilterIVValidator validator, RouterContext ctx, int KBps) Bind the sizer to the validator whose filter it will resize, keeping the share bandwidth to hand back on a resize.LeaveTunnel(RouterContext ctx) Builds the leave tunnel job.Binds the router context.OutboundMessageDistributor(RouterContext ctx, int priority) Create a new outbound message distributor.OutboundMessageDistributor(RouterContext ctx, int priority, SyntheticREDQueue bwe) Create a new outbound message distributor with bandwidth estimation.OutboundReceiver(RouterContext ctx, TunnelCreatorConfig cfg) Binds the context and tunnel config, caching the first hop router info.OutboundTunnelEndpoint(RouterContext ctx, HopConfig config, HopProcessor processor) Binds the context, config, and processor, sizing the RED queue to the allocated bandwidth.PoisonPTG(RouterContext ctx) Builds the gateway that stops a pump thread.PumpedTunnelGateway(RouterContext context, TunnelGateway.QueuePreprocessor preprocessor, TunnelGateway.Sender sender, TunnelGateway.Receiver receiver, TunnelGatewayPumper pumper) A gateway for a single tunnel hop.ReceiveJob(RouterContext ctx, byte[] data) Holds the encrypted gateway message so it can be handed to the receiver once the job queue reaches it.Binds the router context.SendJob(RouterContext ctx, TunnelDataMessage msg) Builds the send job for one tunnel data message.SendJob(RouterContext ctx, TunnelDataMessage msg) The tunnel data message to send after the lookup.ThrottledPumpedTunnelGateway(RouterContext context, TunnelGateway.QueuePreprocessor preprocessor, TunnelGateway.Sender sender, TunnelGateway.Receiver receiver, TunnelGatewayPumper pumper, HopConfig config) A pump-driven gateway that drops excess messages based on estimated bandwidth.TimeoutJob(RouterContext ctx, TunnelDataMessage msg) The tunnel data message dropped on lookup timeout.Binds the router context and initializes the log.TunnelCreatorConfig(RouterContext ctx, int length, boolean isInbound) For exploratory only (null destination).TunnelCreatorConfig(RouterContext ctx, int length, boolean isInbound, Hash destination) Allocates the hop configs and peer arrays for the given length.Creates a new instance of TunnelDispatcher.protectedTunnelGateway(RouterContext context, TunnelGateway.QueuePreprocessor preprocessor, TunnelGateway.Sender sender, TunnelGateway.Receiver receiver) Creates a new TunnelGateway.Creates a new TunnelGatewayPumper and starts configured number of pump threads.TunnelGatewayZeroHop(RouterContext context, TunnelCreatorConfig config) Create a zero-hop gateway for the specified tunnel.TunnelParticipant(RouterContext ctx, HopConfig config, HopProcessor processor) For intermediate tunnel participant (not endpoint).privateTunnelParticipant(RouterContext ctx, HopConfig config, HopProcessor processor, InboundEndpointProcessor inEndProc) Internal constructor shared by all variants.TunnelParticipant(RouterContext ctx, InboundEndpointProcessor inEndProc) For inbound tunnel endpoints.Uses of RouterContext in net.i2p.router.tunnel.pool
Fields in net.i2p.router.tunnel.pool declared as RouterContextModifier and TypeFieldDescriptionprivate static RouterContextBuildHandler._cfgCtxThe context the cached config values belong to.private static RouterContextBuildRequestor._cfgCtxContext the cached config values came from.private static RouterContextTestJob._cfgCtxContext the cached config values were read from.private static RouterContextTunnelPeerSelector._cfgCtxContext the cached config values were read from.private final RouterContextBuildExecutor._contextThe router context.private final RouterContextBuildHandler._contextThe router running these tunnels.private final RouterContextGhostPeerManager._contextThe router context.private final RouterContextIdleTunnelMonitor._contextThe router context.protected final RouterContextTunnelPool._contextThe router context.private final RouterContextTunnelPoolManager._contextThe router context.private final RouterContextBuildHandler.BuildMessageState._ctxThe router receiving the message.private final RouterContextTestJob.PumpJob._ctxThe router context, for scheduling.private static RouterContextParticipatingThrottler._limitInvCtxContext the cached limit invariants were read against; a different context invalidates them.private static RouterContextParticipatingThrottler._loadScoreCtxContext the cached load score was computed against; a different context invalidates it.private static RouterContextParticipatingThrottler._scoreCtxCached RateStat handle for the shared load-score computation; refreshed when the context changes.private final RouterContextParticipatingThrottler.contextThe router context.private final RouterContextRequestThrottler.contextThe router context.private final RouterContextBuildMessageProcessor.ctxThe router context the builds happen in.protected final RouterContextConnectChecker.ctxThe router context.Fields in net.i2p.router.tunnel.pool with type parameters of type RouterContextModifier and TypeFieldDescriptionprivate static final ConcurrentHashMap<RouterContext, TestJob.BatchState> TestJob.BATCH_STATESOneTestJob.BatchStateper router context.Methods in net.i2p.router.tunnel.pool with parameters of type RouterContextModifier and TypeMethodDescriptionprivate static voidTestJob.applyConfiguredQueuedLimit(RouterContext ctx) RefreshTestJob.maxQueuedTestsfrom the configured property when the Tuner has not overridden the static dynamically.(package private) static voidTunnelPeerSelector.applyProbeFailure(RouterContext ctx, Hash peer) Act on a pre-connect probe that could not be delivered.(package private) static StringTestJob.batchDenialReason(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Live gate evaluation for one buffered candidate: reads the in-flight gauges and configured budgets from the context's runtime state, then defers to the pure overload.(package private) static TestJob.BatchStateTestJob.batchState(RouterContext ctx) The runtime state for a router context, created on first use.(package private) static voidTestJob.beginBatchReset(RouterContext ctx) Start a per-context reset of the batch-dispatch subsystem: a router restart, as called fromTunnelPoolManager.restart()before the pools are torn down.private static voidBuildRequestor.buildZeroHop(RouterContext ctx, PooledTunnelCreatorConfig cfg, BuildExecutor exec) Sends the records for a zero hop tunnel.(package private) static floatParticipatingThrottler.calculateLoadScore(RouterContext context) Computes a 0.0–1.0 load score from job queue lag, CPU load, system load, and bandwidth queue pressure, reusing the score computed within the lastParticipatingThrottler.LOAD_SCORE_CACHE_MS.(package private) static TestJob.InstanceClaimsTestJob.claimBatchSlot(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Reserve the instance slots a batched TestJob needs: the total counter (memory bound) and the per-pool claim.(package private) static floatParticipatingThrottler.computeLoadScore(RouterContext context) Uncached 0.0–1.0 load score from job queue lag, CPU load, system load, and bandwidth queue pressure.static voidBuildMessageGenerator.createRecord(int recordNum, int hop, TunnelBuildMessage msg, TunnelCreatorConfig cfg, Hash replyRouter, long replyTunnel, RouterContext ctx, PublicKey peerKey, Properties props) Place the asymmetrically encrypted record in the specified record slot, containing the hop's configuration (as well as the reply info, if it is an outbound endpoint).private static TunnelBuildMessageBuildRequestor.createTunnelBuildMessage(RouterContext ctx, TunnelPool pool, PooledTunnelCreatorConfig cfg, TunnelInfo pairedTunnel, BuildExecutor exec) Creates a tunnel build message using the most efficient format supported by all hops and the local router.(package private) static intTestJob.drainBuffer(RouterContext ctx) Drain one batch from the first-test buffer and dispatch admitted candidates directly (no per-tunnel queue entry).(package private) static intBuildExecutor.effectiveTarget(RouterContext ctx, TunnelPoolSettings s, boolean keepConfiguredQuantity) Effective tunnel-count target a pool builds toward.(package private) static voidTestJob.endBatchReset(RouterContext ctx) Finish a reset started byTestJob.beginBatchReset(RouterContext): resume offers and pump dispatch.static longTunnelPeerSelector.getActivityWindow(RouterContext ctx) Compute the activity window for peer selection from the base ladder only, scaled by whatever multiplier the availability gate has granted.static longTunnelPeerSelector.getActivityWindow(RouterContext ctx, double buildSuccess) Compute the activity window for peer selection based on current network visibility.private static intTestJob.getBaseMaxQueuedTests(RouterContext ctx) Base max queued tests value, read from PROP or static default.(package private) static doubleTunnelPeerSelector.getBuildSuccess(RouterContext ctx) Current tunnel build success ratio, 1.0 when no data is available.(package private) static intTunnelPool.getBuildTriesQuantityOverride(RouterContext ctx) Quantity override threshold from config or default (12).private static RateStatParticipatingThrottler.getBwQueueRateStat(RouterContext context) Resolves the "bwLimiter.participatingBandwidthQueue" RateStat once per context.private static StringTunnelPeerSelector.getCachedExcludeCaps(RouterContext ctx) Returns the cached exclude-caps config value.private static StringTunnelPeerSelector.getCachedExplicitPeers(RouterContext ctx) Returns the cached explicit peers config value.private static booleanTunnelPeerSelector.getCachedIbClientSlow(RouterContext ctx) Returns the cached inbound client slow flag.private static booleanTunnelPeerSelector.getCachedIbClientUnreachable(RouterContext ctx) Returns the cached inbound client unreachable flag.private static booleanTunnelPeerSelector.getCachedIbExplSlow(RouterContext ctx) Returns the cached inbound exploratory slow flag.private static booleanTunnelPeerSelector.getCachedIbExplUnreachable(RouterContext ctx) Returns the cached inbound exploratory unreachable flag.private static booleanTunnelPeerSelector.getCachedObClientSlow(RouterContext ctx) Returns the cached outbound client slow flag.private static booleanTunnelPeerSelector.getCachedObClientUnreachable(RouterContext ctx) Returns the cached outbound client unreachable flag.private static booleanTunnelPeerSelector.getCachedObExplSlow(RouterContext ctx) Returns the cached outbound exploratory slow flag.private static booleanTunnelPeerSelector.getCachedObExplUnreachable(RouterContext ctx) Returns the cached outbound exploratory unreachable flag.private static intTestJob.getClientPoolTestBudget(RouterContext ctx, TunnelPool pool, int activeCount) Per-pool test budget for client pools, bounded by three knobs: the Tuner budget (dynamic), the pool-coverage cap (at most coverageThreshold of a pool's active tunnels under test at once), and the absolute per-pool cap.private static longGhostPeerManager.getCooldownMs(RouterContext ctx) Reads the ghost peer cooldown time.private static StringTunnelPeerSelector.getEffectiveExcludeCaps(RouterContext ctx, double buildSuccess) Exclusion caps to apply, adapting to build success.private static longTunnelPeerSelector.getEffectiveFirstHopCooldown(RouterContext ctx) Effective first-hop fail cooldown.private static StringTunnelPeerSelector.getExcludeCaps(RouterContext ctx) Exclude caps to apply during peer selection.static intBuildRequestor.getFirstHopTimeout(RouterContext ctx) How long the OutNetMessage for the first hop gets before TunnelBuildFirstHopFailJob fires.static longBuildExecutor.getGoodDeficitThrottle(RouterContext ctx) The GOOD deficit throttle interval from config or default (30s).private static longBuildExecutor.getGracePeriod(RouterContext ctx) Returns the startup grace period for builds.static intTestJob.getHardLimit(RouterContext ctx) Hard limit for total TestJob instances (queued + active).private static longBuildHandler.getJobLagLimitTunnel(RouterContext ctx) Gives the job lag past which tunnel requests are dropped.private static longTestJob.getLatencyDemotionThreshold(RouterContext ctx) Adaptive latency threshold for demoting a peer as "high latency" after a tunnel test.(package private) static longTunnelPool.getLeaseMaxDuration(RouterContext ctx) Maximum lease set lease duration from config or default (10 minutes).(package private) static longTunnelPool.getLeaseSetBuildMinInterval(RouterContext ctx) LeaseSet build minimum interval from config or default (2 minutes).static longTunnelPool.getLeaseViabilityWindow(RouterContext ctx) A lease counts toward a re-mint while it has at least this much remaining: three minutes covers the re-sign request, floodfill propagation, and initial connection establishment, and a tunnel closer to expiry than this is already inside the pool's proactive replacement window (BuildExecutor starts replacing GOOD tunnels 330s out), so counting it would overstate the pool's health.private static intTestJob.getMaxClientPerPool(RouterContext ctx) Returns the test limit for client pools.(package private) static intTunnelPool.getMaxConcurrentBuildsPerDirection(RouterContext ctx) Max concurrent builds per direction from config or default (6).private static intTestJob.getMaxConcurrentTests(RouterContext ctx) Maximum number of tunnel tests that can run concurrently.private static intTestJob.getMaxExploratoryPerPool(RouterContext ctx) Returns the test limit for exploratory pools.static intBuildHandler.getMaxLookupLimit(RouterContext ctx) The max concurrent RI lookup limit in effect, tuned value if set else config.private static intBuildHandler.getMaxParticipatingTunnels(RouterContext ctx) Upper bound on participating tunnels before the router drops incoming build requests, tunable viarouter.maxParticipatingTunnels.private static intBuildHandler.getMaxPendingLookups(RouterContext ctx) Pending next-hop lookups allowed to wait for a free slot while their build request is still inside the originator's budget.private static longBuildHandler.getMaxRequestAge(RouterContext ctx) Gives the oldest accepted build request age.private static longBuildHandler.getMaxRequestAgeEcies(RouterContext ctx) Same age limit for ECIES-encrypted requests.private static longBuildHandler.getMaxRequestFuture(RouterContext ctx) Gives the future clock skew a request may show.static intTestJob.getMaxTestDelay(RouterContext ctx) The max test delay in effect, tuned value if set else config.static intTestJob.getMaxTestPeriod(RouterContext ctx) The max test period in effect, tuned value if set else config.private static intExploratoryPeerSelector.getMinActivePeers(RouterContext ctx) Minimum active peers for a normal selection.private static intExploratoryPeerSelector.getMinActivePeersStartup(RouterContext ctx) Minimum active peers before the startup gate lifts.private static intBuildHandler.getMinLookupLimit(RouterContext ctx) Gives the floor for concurrent RI lookups.private static intExploratoryPeerSelector.getMinNonfailingPct(RouterContext ctx) Minimum share of pools that must be building.static intTestJob.getMinTestDelay(RouterContext ctx) The min test delay in effect, tuned value if set else config.static intTestJob.getMinTestPeriod(RouterContext ctx) The min test period in effect, tuned value if set else config.static intBuildHandler.getNextHopLookupTimeout(RouterContext ctx) The next-hop lookup timeout in effect, tuned value if set else config.TunnelPeerSelector.getPeersInAllPools(RouterContext ctx) All non-self peers in active tunnels across ALL pools (client IB/OB + exploratory IB/OB).TunnelPeerSelector.getPeersInPool(RouterContext ctx, TunnelPool pool) All non-self peers in active tunnels of the given pool.static intBuildHandler.getPercentLookupLimit(RouterContext ctx) The percent lookup limit in effect, tuned value if set else config.private static doubleTestJob.getPoolCoverageThreshold(RouterContext ctx) Returns the pool coverage needed to skip testing.(package private) static longTunnelPool.getPruneEarlyExpiry(RouterContext ctx) Early expiry time for pruned tunnels, shared by every prune path (pool sweep and Remove Slow) so one pool's tunnels cannot be given a different head start than another's for the same configuration.(package private) static longTunnelPool.getRefreshThrottle(RouterContext ctx) Refresh throttle interval from config or default (2 minutes).static intBuildRequestor.getRequestTimeout(RouterContext ctx) How long we wait for a reply before trying a different pool/peers.(package private) static longTunnelPool.getStartupTime(RouterContext ctx) Startup suppression period from config or default (5 minutes).private static intGhostPeerManager.getTimeoutThreshold(RouterContext ctx) Reads the timeout count that marks a peer.(package private) static intBuildExecutor.getTunnelLifetime(RouterContext ctx) The tunnel lifetime from config, delegated to TunnelPool.static intTunnelPool.getTunnelLifetime(RouterContext ctx) Tunnel lifetime from config or default (11 minutes).static intBuildExecutor.getTunnelTargetBuffer(RouterContext ctx) The target build buffer from config or default (0).private static intBuildExecutor.getTunnelTargetMin(RouterContext ctx) Returns the configured minimum tunnel target.private static booleanBuildRequestor.handleInboundBuild(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelInfo pairedTunnel, I2NPMessage msgIn, BuildExecutor exec, Log log) Dispatch an inbound build request through the paired tunnel, garlic-wrapping the ShortTBM when the IBGW differs from the paired tunnel's endpoint so the IBGW identity stays hidden.private static voidBuildRequestor.handleOutboundBuild(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelInfo pairedTunnel, I2NPMessage msg, BuildExecutor exec, Log log, long firstHopTimeout) Builds and sends the records for one outbound tunnel.(package private) static booleanTestJob.hasPoolTestHeadroom(TestJob.BatchState state, RouterContext ctx, TunnelPool pool, int activeCount) Whether the per-pool instance budget still has room for one more test inpool.protected static booleanTunnelPeerSelector.hasRecoveredFromFailure(RouterContext ctx, Hash peer) Check if a peer has recovered from failure and can be reconsidered.protected static booleanTunnelPeerSelector.hasValidTransportAddress(RouterContext ctx, Hash peer) Check if a peer's RouterInfo has at least one reachable SSU or NTCP address.static booleanTunnelPeerSelector.isFirstHopFailing(RouterContext ctx, Hash peer) Check if a peer recently failed as first hop and should be excluded.static booleanTunnelPeerSelector.isInStartupGracePeriod(RouterContext ctx) Is the router in the startup grace period? During startup, peers haven't accumulated test history yet, so quality filters (pre-qualification, tier capping) should be relaxed to allow tunnels to build.protected static booleanTunnelPeerSelector.isLowAcceptanceRatio(RouterContext ctx, Hash peer) Check if a peer has a history of rejecting tunnel build requests.(package private) static booleanTunnelPoolManager.FastTierProbeJob.isRecentlyActive(RouterContext ctx, Hash peer, long now) Whether this peer has traffic recent enough that probing adds nothing.(package private) static booleanTunnelPeerSelector.isStalePeer(RouterContext ctx, Hash peer) Check whether a peer is stale — no contact (heard from or heard about) within the dynamic activity window.(package private) static booleanTunnelPeerSelector.isStalePeer(RouterContext ctx, Hash peer, double buildSuccess) Check whether a peer is stale — no contact (heard from or heard about) within the dynamic activity window.(package private) static booleanClientPeerSelector.isStartupGracePeriod(RouterContext ctx) Whether the router is still in the startup grace period (firstSTARTUP_GRACE_MSms of uptime).static voidTunnelPeerSelector.keepAlive(RouterContext ctx, boolean aggressive) Periodically called to keep transport sessions alive for top-tier peers and proactively establish connections to Fast/HighCap peers before builds need them.(package private) static booleanParticipatingThrottler.limitInvariantCacheStale(long lastQueried, long now, RouterContext cachedCtx, RouterContext ctx) Whether the two invariant limit inputs are old enough to re-read.(package private) static booleanParticipatingThrottler.loadScoreCacheStale(long lastQueried, long now, RouterContext cachedCtx, RouterContext ctx) Whether the cached load score is old enough to recompute.private voidClientPeerSelector.logAcceptedFirstHopTier(RouterContext ctx, Hash firstHop, int tier, int attempt, int attempts, int remaining, double buildSuccess) Log the quality tier that actually produced this build's first hop.private static voidTestJob.logBatchDenial(TestJob.BatchState state, RouterContext ctx, String reason) Rate-limited INFO line for a batch denial, so the reason a backlog is not draining stays visible without flooding the log.private static RouterInfoTunnelPeerSelector.lookupRouterInfoUnvalidated(RouterContext ctx, Hash peer) Fetch a peer RouterInfo for a message we address to it, preferring the unvalidated store lookup.private static voidExploratoryPeerSelector.noteAllBannedDiscard(RouterContext ctx) Record a discarded selection, creating the stat on first use.(package private) static voidTunnelPeerSelector.noteFirstHopRtt(RouterContext ctx, Hash peer, Transport transport) Extract the transport's measured direct-link RTT and record it on the peer.(package private) static booleanTestJob.offerFirstTest(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Offer a tunnel's first test to the batched dispatch buffer instead of creating a queue entry per tunnel.static voidTestJob.onJobQueueShutdown(RouterContext ctx) The job queue is going away.(package private) static intTestJob.poolInFlightBudget(RouterContext ctx, TunnelPool pool) Per-pool in-flight budget for a pool in its current state, or -1 when the pool gate is skipped.(package private) static booleanBuildRequestor.preConnectFallback(RouterContext ctx, Hash peer, PooledTunnelCreatorConfig cfg, BuildExecutor exec) Approach 2: Fire-and-forget fallback — attempt to establish the transport session and retry the build once.protected static TunnelPeerSelector.PreConnectOutcomeTunnelPeerSelector.preConnectTo(RouterContext ctx, Hash peer) Send aDatabaseLookupMessageto a peer so it answers with our RouterInfo, which forces a full session handshake rather than the emptyDataMessagethat would leave the peer with nothing to reply to.private static voidBuildRequestor.prepare(RouterContext ctx, PooledTunnelCreatorConfig cfg) Assigns tunnel IDs to each hop in the configuration.(package private) static List<TestJob.PendingTest> TestJob.prioritizeBatch(List<TestJob.PendingTest> scan, long now, RouterContext ctx) Reorder one scan: last-chance candidates first (soonest expiry), then the rest by peer tier.protected static voidTunnelPeerSelector.prunePeerMaps(RouterContext ctx) Prune expired entries from static peer maps.static voidTunnelPeerSelector.publishWindowMultiplier(RouterContext ctx) Publish the current activity-window multiplier.(package private) static voidTestJob.rebufferAll(TestJob.BatchState state, RouterContext ctx, List<TestJob.PendingTest> pending) Return candidates to the buffer head, preserving their order, after a gate denial or a lost claim race so the next pump run retries them instead of waiting for a sweep re-offer.protected static voidTunnelPeerSelector.recordFirstHopFail(RouterContext ctx, Hash peer) Record that a peer failed as first hop (first hop unreachable).private static voidBuildHandler.refreshBuildConfig(RouterContext ctx) Refresh the cached build configuration from properties at most once per CONFIG_REFRESH_MS, or immediately when the context changes.private static voidBuildRequestor.refreshBuildConfig(RouterContext ctx) Refresh the cached build configuration from properties at most once per CONFIG_REFRESH_MS, or immediately when the context changes.private static voidTunnelPeerSelector.refreshPeerConfig(RouterContext ctx) Refresh the cached peer-selection configuration from properties at most once per CONFIG_REFRESH_MS, or immediately when the context changes.private static voidTestJob.refreshTestJobConfig(RouterContext ctx) Refresh the cached test-job configuration from properties at most once per CONFIG_REFRESH_MS, or immediately when the context changes.private voidTunnelPool.relaxWindowForStarvation(RouterContext ctx) Raise the peer-selection activity window to its ceiling because a pool has no usable tunnels, and publish the new value.static booleanBuildRequestor.request(RouterContext ctx, PooledTunnelCreatorConfig cfg, BuildExecutor exec, long firstHopTimeout) Initiates a tunnel build request.static voidExpireJob.scheduleExpiration(RouterContext ctx, PooledTunnelCreatorConfig cfg) Schedule a tunnel for batched expiration.(package private) static voidTunnelPeerSelector.seedProvenResponders(RouterContext ctx, long now) Seed the proven-responder map with random peers from the router's peer profiles when the map is belowTunnelPeerSelector.MIN_PROVEN_RESPONDER_COUNT.private static TunnelInfoBuildRequestor.selectPairedTunnel(RouterContext ctx, TunnelPool pool, PooledTunnelCreatorConfig cfg, BuildExecutor exec, Log log) Selects an appropriate tunnel for sending the build reply.(package private) static booleanTestJob.shouldDropPending(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Whether a buffered candidate should be discarded instead of tested: its pool died, it was never fully built, it is a ping tunnel or was pruned for early expiry, its test already started (registered while buffered), or it is no longer UNTESTED (a prior dispatch tested or traffic-proven it while it waited).static booleanTunnelPeerSelector.shouldExclude(RouterContext ctx, RouterInfo peer) Should the peer be excluded based on its published caps, crypto, and version?static booleanTunnelPeerSelector.shouldExclude(RouterContext ctx, RouterInfo peer, double buildSuccess) Should the peer be excluded based on its published caps, crypto, and version?private static booleanTunnelPeerSelector.shouldExclude(RouterContext ctx, RouterInfo peer, String excl, boolean isExploratory, double buildSuccess) Should the peer be excluded based on its published caps, crypto, and version?(package private) static booleanClientPeerSelector.shouldPreConnect(RouterContext ctx, Hash peer) Determines whether preConnectTo() should be called for a first-hop candidate.(package private) static booleanTestJob.shouldRejectAtOffer(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Whether an offer must be refused outright: no pool owns the tunnel, it was never fully built, it is a ping tunnel, it is already expired (only the drain-time early-expiry window is left toTestJob.shouldDropPending(RouterContext, PooledTunnelCreatorConfig, TunnelPool), since last-chance offers arrive inside it on purpose), its test already started, or it is no longer UNTESTED.static booleanTestJob.shouldSchedule(RouterContext ctx, PooledTunnelCreatorConfig cfg) Static method to check if a TestJob should be created and scheduled.protected static booleanTunnelPeerSelector.supportsNTCP2(RouterContext ctx, Hash peer) Check if a peer supports NTCP2 transport.(package private) static intTestJob.tierRank(TestJob.PendingTest p, RouterContext ctx) Tier rank of a candidate's first hop, best first:0fast,1high-capacity,2untiered.private static booleanClientPeerSelector.wasRecentlyConnected(RouterContext ctx, Hash peer) Check whether the peer was connected within the cooldown window.static intTunnelPeerSelector.windowMultiplierFor(RouterContext ctx) TunnelPeerSelector.windowMultiplierFor(int, boolean, int, int)bound to the live router: reads the current fast-peer count and startup state.Constructors in net.i2p.router.tunnel.pool with parameters of type RouterContextModifierConstructorDescription(package private)AliasedTunnelPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPoolSettings settings, TunnelPool aliasOf) Create an aliased tunnel pool.BootstrapPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPool pool) Build bootstrap tunnels for exploratory pools after the startup delay.BuildExecutor(RouterContext ctx, TunnelPoolManager mgr, GhostPeerManager ghostMgr) Create a new BuildExecutor.BuildHandler(RouterContext ctx, TunnelPoolManager manager, BuildExecutor exec) Wires up the pool manager, executor and ban logger, and registers the tunnel build rate stats.Creates a new BuildMessageProcessor.BuildMessageState(RouterContext ctx, I2NPMessage m, RouterIdentity f, Hash h) Either f or h may be null, but both should be null only if we're to be a IBGW and it came from us as a OBEP.ClientPeerSelector(RouterContext context) Creates the selector over the given router context.ConditionalOutboundStartup(TunnelPool out, TunnelPool in, TunnelPoolManager mgr, RouterContext context, Hash dest) Schedule a startup that is abandoned unless the pools are ready in time.ConnectChecker(RouterContext context) Create a new ConnectChecker.privateExpireJob(RouterContext ctx) Constructor for the batch job, with no tunnel config.ExploratoryPeerSelector(RouterContext context) Creates the selector over the given router context.(package private)FastTierProbeJob(RouterContext ctx, TunnelPoolManager mgr) Probe whether fast-tier peers are reachable, shortly after startup.GhostPeerManager(RouterContext context) Create a ghost peer manager.(package private)HandleReq(RouterContext ctx, BuildHandler.BuildMessageState state, BuildRequestRecord req, Hash nextPeer, AtomicBoolean decremented) Prepares to forward one build request.(package private)Starts the scan timer and registers the dropped-tunnel stat.(package private)Participating throttler.PooledTunnelCreatorConfig(RouterContext ctx, int length, boolean isInbound, Hash destination, TunnelPool pool) Creates a new instance of PooledTunnelCreatorConfig.(package private)PreConnectFailJob(RouterContext ctx, Hash peer) Prepares to retry a failed pre-connect session.(package private)PumpJob(RouterContext ctx) Prepares to pump test messages through the tunnels.Refresh the lease sets after slow tunnels are removed.Remove slow tunnels periodically, starting after the startup delay.(package private)Creates a new RequestThrottler bound to the given router context.TestJob(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) TestJob.(package private)TestJob(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool, TestJob.InstanceClaims claims) TestJob for a caller that already holds the instance slots, such as the batch pump, which must claim before it constructs so a refused candidate can go back to the buffer instead of being dropped.(package private)TimeoutReq(RouterContext ctx, BuildHandler.BuildMessageState state, BuildRequestRecord req, Hash nextPeer, AtomicBoolean decremented, int retriesLeft) Prepares to time out one build request.(package private)Records a failed first hop reply.privateCreates the job for one build message.privateTunnelBuildNextHopFailJob(RouterContext ctx, HopConfig cfg) Creates the job reporting a next-hop failure.privateCreates the job for one build reply.protectedTunnelPeerSelector(RouterContext context) Creates a selector that reads its peer profiles from the router context.(package private)TunnelPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPoolSettings settings, TunnelPeerSelector sel) Tunnel pool.Manage tunnel pools for the given router context.Uses of RouterContext in net.i2p.router.update
Fields in net.i2p.router.update declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextConsoleUpdateManager._contextThe router context.private final RouterContextDevSU3UpdateHandler._contextThe router context the handler runs in.private final RouterContextDummyHandler._contextThe router the dummy update runs on.private final RouterContextNewsTimerTask._contextThe router context.private final RouterContextPluginUpdateHandler._contextThe router context the handler runs in.private final RouterContextUnsignedUpdateHandler._contextThe router context the handler runs in.protected final RouterContextUpdateHandler._contextThe router context for configuration access.protected final RouterContextUpdateRunner._contextRouter context.Constructors in net.i2p.router.update with parameters of type RouterContextModifierConstructorDescriptionConsoleUpdateManager(RouterContext ctx, ClientAppManager listener, String[] args) Creates the manager; the update handlers for the router, plugins, news and the desktop GUI are registered and checks scheduled inConsoleUpdateManager.startup().DevSU3UpdateChecker(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris) Registers the check as a partial dev SU3 update and adopts the first URI.DevSU3UpdateHandler.DevSU3UpdateRunner(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris) DevSU3UpdateRunner.DummyHandler(RouterContext ctx, ConsoleUpdateManager mgr) Creates a handler that serves dummy update checks only.DummyRunner(RouterContext ctx, ConsoleUpdateManager mgr, long maxTime) Creates a runner that sleeps for the requested time, then reports failure.NewsFetcher(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris) Fetches from the first source that succeeds, using the default timeout.NewsFetcher(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris, long timeout) And we will log status to the sidebar.NewsHandler(RouterContext ctx, ConsoleUpdateManager mgr) Creates the news update checker for the given update manager.NewsTimerTask(RouterContext ctx, ConsoleUpdateManager mgr) Schedules the recurring news check and runs the first one now.PluginUpdateChecker(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris, String appName, String oldVersion) Prepare a plugin update check.Create a plugin update handler.PluginUpdateRunner(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris, String appName, String oldVersion) Set up a single-URI plugin update; the first entry of uris is the only one used.UnsignedUpdateChecker(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris, long lastUpdateTime) Records the installed version time used to decide if an update is newer.Hold the router context and the update manager that the checker and runner created here need; no work happens in the constructor.UnsignedUpdateRunner(RouterContext ctx, ConsoleUpdateManager mgr, List<URI> uris) Sets up an unsigned router update against the first of the given mirrors.UpdateHandler(RouterContext ctx, ConsoleUpdateManager mgr) Stores the context and the manager that owns the update runner.UpdateRunner(RouterContext ctx, ConsoleUpdateManager mgr, UpdateType type, List<URI> uris) Uses router version for partial checks.UpdateRunner(RouterContext ctx, ConsoleUpdateManager mgr, UpdateType type, List<URI> uris, String currentVersion) Constructor with explicit current version.UpdateRunner(RouterContext ctx, ConsoleUpdateManager mgr, UpdateType type, UpdateMethod method, List<URI> uris) Uses router version for partial checks.UpdateRunner(RouterContext ctx, ConsoleUpdateManager mgr, UpdateType type, UpdateMethod method, List<URI> uris, String currentVersion) Full constructor.Uses of RouterContext in net.i2p.router.util
Fields in net.i2p.router.util declared as RouterContextModifier and TypeFieldDescriptionprotected final RouterContextRouterPasswordManager._contextThe router context.Methods in net.i2p.router.util with parameters of type RouterContextModifier and TypeMethodDescriptionprivate static RouterInfoMaskedIPSet.lookupRILocally(RouterContext ctx, Hash peer) This gets the peer from the netdb without validation, for efficiency and to avoid deadlocks.Constructors in net.i2p.router.util with parameters of type RouterContextModifierConstructorDescriptionMaskedIPSet(RouterContext ctx, Hash peer, int mask) The Set of IPs for this peer, with a given mask.MaskedIPSet(RouterContext ctx, Hash peer, RouterInfo pinfo, int mask) The Set of IPs for this peer, with a given mask.MaskedIPSet(RouterContext ctx, RouterInfo pinfo, int mask) The Set of IPs for this peer, with a given mask.Password manager for the given router context.Uses of RouterContext in net.i2p.router.web
Fields in net.i2p.router.web declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextDeadlockDetector._contextThe router being watched.protected RouterContextFormHandler._contextRouter context.private final RouterContextGraphGenerator._contextThe router context.protected RouterContextHelperBase._contextThe router context.protected RouterContextPluginStarter._contextThe router context the plugins are started in.private final RouterContextRouterConsoleRunner._contextThe router context.protected RouterContextUpdateHandler._contextRouter context backing this handler's update pages.private final RouterContextPluginStarter.PluginUpdater._ctxThe router context.private final RouterContextWrapperListener.SignalHandler._ctxtThe router being signalled.Methods in net.i2p.router.web that return RouterContextModifier and TypeMethodDescriptionstatic RouterContextContextHelper.getContext(String contextId) To take the first context in the list first context in the list.Methods in net.i2p.router.web with parameters of type RouterContextModifier and TypeMethodDescription(package private) static WebAppContextWebAppStarter.addWebApp(RouterContext ctx, ContextHandlerCollection server, String appName, String warPath, File tmpdir) Add but don't start This is used only byRouterConsoleRunner, which adds all the webapps first and then starts all at once.private static voidPluginStarter.deferredDeletePlugins(RouterContext ctx) Deferred deletion of plugins that we failed to delete before.static booleanPluginStarter.deletePlugin(RouterContext ctx, String appName) Uninstall a plugin: run its client apps' uninstall commands, unregister its themes (falling back to the default theme if it is the current one), remove its directory and drop its plugins.config entries.static booleanDeadlockDetector.detect(RouterContext ctx) Check this detector's router context for deadlocked threads.static booleanNewsHelper.dontInstall(RouterContext ctx) Whether installing an update is blocked outright.(package private) static voidRouterConsoleRunner.initialize(RouterContext ctx, WebAppContext context) Set up basic security constraints for the webapp.static booleanNewsHelper.isBaseReadonly(RouterContext ctx) Whether an update could not be written even if it were allowed.private static booleanPluginStarter.isClientThreadRunning(String pluginName, RouterContext ctx) Returnstrueif one or more client threads are running in a given plugin.static booleanNewsHelper.isDevSU3UpdateAvailable(RouterContext ctx) Will be false if already downloaded or if dev update disabled.static booleanPluginStarter.isPluginRunning(String pluginName, RouterContext ctx) Is any part of the plugin still up? Client threads, console webapps, queued client apps and registered client apps all count.protected static booleanPluginStarter.isPluginRunning(String pluginName, RouterContext ctx, Server s) Is any part of the plugin still up? Client threads, console webapps, queued client apps and registered client apps all count.static booleanNewsHelper.isUnsignedUpdateAvailable(RouterContext ctx) Will be false if already downloaded or if dev update disabled.static booleanNewsHelper.isUpdateDisabled(RouterContext ctx) Whether updating has been switched off in the config.static longNewsHelper.lastChecked(RouterContext ctx) When news was last fetched, whether or not anything changed.private static longNewsHelper.lastNewEntry(RouterContext ctx) When we last got a new news entry.static longNewsHelper.lastUpdated(RouterContext ctx) When the news was last downloaded.private static voidPluginStarter.pluginIncompatible(Log log, RouterContext ctx, String appName, String detail, String userMessage) Reject a plugin with incompatible requirements: log, disable, and throw.(package private) static voidConfigServiceHandler.registerSignalHandler(RouterContext ctx) Register a handler for signals, so we can handle HUP from the wrapper (wrapper 3.2.0 or higher).static voidConfigServiceHandler.registerWrapperNotifier(RouterContext ctx, int code, boolean rekey) Register two shutdown hooks, one to rekey and/or tell the wrapper we are stopping, and a final one to tell the wrapper we are stopped.private static voidPluginStarter.runClientApps(RouterContext ctx, File pluginDir, List<ClientAppConfig> apps, String action) Start the client apps of a plugin.static booleanNewsHelper.shouldShowNews(RouterContext ctx) Whether the news file is newer than the stamp saved when it was hidden.static voidNewsHelper.showNews(RouterContext ctx, boolean yes) Save config with the timestamp of the current news to hide, or 0 to show.static booleanPluginStarter.startPlugin(RouterContext ctx, String appName) Start a plugin: extract a pending update, enforce the min/max I2P, Java and Jetty version requirements, register its themes, client apps, console webapps, translation jars and summary bar link.(package private) static voidPluginStarter.startPlugins(RouterContext ctx) Start every plugin whose plugins.config entry is "true", skipping any that an update already started.static voidWebAppStarter.startWebApp(RouterContext ctx, ContextHandlerCollection server, String appName, String warPath) Adds and starts.static voidWebAppStarter.startWebApp(RouterContext ctx, ContextHandlerCollection server, String appName, String warPath, String pluginName) Adds and starts.static StringNewsHelper.status(RouterContext ctx) The news and update status block.static StringNewsHelper.status(RouterContext ctx, HttpSession session) The news and update status block.static booleanPluginStarter.stopPlugin(RouterContext ctx, String appName) Stop a plugin: shut down its client apps and console webapps, drop its summary bar link, and release its thread group, pending timers and ClassLoader cache.protected static booleanPluginStarter.stopPlugin(RouterContext ctx, Server s, String appName) Stop a plugin using an already-located console server, so this also works during shutdown after the server has been unregistered.static voidWebAppStarter.stopWebApp(RouterContext ctx, String appName) Stop it and remove the context.(package private) static voidWebAppStarter.stopWebApp(RouterContext ctx, Server s, String appName) Stop it and remove the context.static voidRouterConsoleRunner.storeWebAppProperties(RouterContext ctx, Properties props) Persist the webapp enable properties to the config directory.static voidPluginStarter.updateAll(RouterContext ctx) Starts the plugin update on a daemon thread, so the caller does not block.private static voidPluginStarter.updateAll(RouterContext ctx, boolean delay) Fetches and restarts the installed plugins in the calling thread.static ConsoleUpdateManagerUpdateHandler.updateManager(RouterContext ctx) Fetch the update manager that the update pages write to, without starting it.Constructors in net.i2p.router.web with parameters of type RouterContextModifierConstructorDescriptionCreate a manager over the router's config store, migrating any legacy plaintext "consolePassword" entry to the salted/hash form on the way in.Start the periodic deadlock poll, scheduled only when enabled.Installs the rrd4j log bridge and the shutdown hook.Creates the runner for the deferred plugin startup thread.PluginStopper(RouterContext ctx, Server server) Remembers the jetty server whose plugins are to be stopped.Hold the context the update runs against.RouterConsoleRunner(RouterContext ctx, ClientAppManager mgr, String[] args) Construct and start the console, parsing command-line arguments.Records the router to stop.TrackedDelayedClient(String pluginName, SimpleTimer2 pool, RouterContext enclosingContext, String className, String clientName, String[] args, ThreadGroup threadGroup, ClassLoader cl) Builds a delayed client tracked to its plugin.Binds the given router context and takes its log from it.Wrapper must be 3.2.0 or higher, or will throw class not found error.Uses of RouterContext in net.i2p.router.web.helpers
Fields in net.i2p.router.web.helpers declared as RouterContextModifier and TypeFieldDescriptionprivate final RouterContextBanlistRenderer._contextThe router context.private final RouterContextNetDbComparators.CountryComparator._contextThe router context used to read the display language.private final RouterContextNetDbComparators.LeaseSetComparator._contextThe router context used to look up lease and country data.private final RouterContextNetDbRenderer._contextThe router context.private final RouterContextNetDbRouterCache._contextThe router whose netdb is read.private final RouterContextProfileOrganizerRenderer._contextThe router context.private final RouterContextSidebarRenderer._contextThe router the sidebar describes.private final RouterContextStatsGenerator._contextThe router whose stats are written.private final RouterContextSybilRenderer._contextThe router context.private final RouterContextTunnelRenderer._contextThe router context.Methods in net.i2p.router.web.helpers with parameters of type RouterContextModifier and TypeMethodDescriptionprivate static StringConfigRestartBean._t(String s, Object o, RouterContext ctx) Translates a label with one argument substituted.private static StringConfigRestartBean._t(String s, RouterContext ctx) Translates a label using the router's language.private static voidClientSKMDebugHelper.appendRatchet(RouterContext ctx, StringBuilder sections, String title, RatchetSKM rskm) Appends one ratchet's debug rows under a title.(package private) static Collection<App> HomeHelper.buildApps(RouterContext ctx, String config) Parse the config string into the set of apps to offer.private static voidConfigRestartBean.buttons(RouterContext ctx, StringBuilder buf, String url, String nonce, String[] s) Value,class,label,...(package private) static StringCapabilitiesRenderer.capTooltip(RouterContext ctx) Tooltip suffix shared by all capability links.private static StringClientSKMDebugHelper.clientTitle(RouterContext ctx, Destination dest, Hash h) The client's nickname when its inbound tunnel has one, otherwise the base32 destination.private static StringClientSKMDebugHelper.columns(RouterContext ctx) The column header row, translated.static booleanConfigRestartBean.isRestarting(RouterContext ctx) Check if the router is restarting.static booleanConfigRestartBean.isShuttingDown(RouterContext ctx) Check if the router is shutting down.private static StringConfigRestartBean.ngettext(String s, String p, int n, RouterContext ctx) Translate a string whose form depends on a count (ngettext).static voidClientSKMDebugHelper.render(RouterContext ctx, Writer out) 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).static voidSybilRenderer.renderSybilHTML(Writer out, RouterContext ctx, List<Hash> sybils, String victim) Called from NetDbRenderer.(package private) static voidHomeHelper.saveApps(RouterContext ctx, String prop, Collection<App> apps, boolean full) Write the app list back out to the named property.(package private) static voidSidebarHelper.saveSummaryBarSections(RouterContext ctx, String page, Map<Integer, String> sections) Save the summary bar section order to router config.voidLogsHelper.setContext(RouterContext context) Sets the router context whose log manager this helper reads from.Constructors in net.i2p.router.web.helpers with parameters of type RouterContextModifierConstructorDescriptionBanlistRenderer(RouterContext context) Stores the router context used to reach the banlist and network database.Create a comparator ordering country names in the console's language.Create a comparator for the console's leaseset listing.Create a renderer bound to the given context.Create an empty cache.ProfileOrganizerRenderer(ProfileOrganizer organizer, RouterContext context) Creates a new ProfileOrganizerRenderer.ProfileOrganizerRenderer(ProfileOrganizer organizer, RouterContext context, boolean fragmentKeys) Creates a new ProfileOrganizerRenderer.Binds the handler to the router context owning the reseed checker.SidebarRenderer(RouterContext context, SidebarHelper helper) Create the renderer bound to the helper that supplies sidebar data.StatsGenerator(RouterContext context) Hold the router context whose StatManager supplies the stats.Renders the Sybil analysis tables for the console.Hold the router context every render method reads its pools and statistics from.Uses of RouterContext in net.i2p.router.web.servlets
Methods in net.i2p.router.web.servlets with parameters of type RouterContextModifier and TypeMethodDescriptionprivate booleanLoginServlet.hasAnyPassword(RouterContext ctx) Checks the password files for any usable password.Uses of RouterContext in net.i2p.servlet.filters
Methods in net.i2p.servlet.filters with parameters of type RouterContextModifier and TypeMethodDescriptionprivate StringAuthFilter.authenticateBasicAuth(HttpServletRequest req, HttpServletResponse resp, RouterContext ctx) Authenticates the basic auth header of the request.private booleanAuthFilter.hasAnyPassword(RouterContext ctx) Checks whether any console password is set.