net.i2p.router
public class RouterContext extends I2PAppContext
_clock, _clockInitialized, _globalAppContext, _keyRing, _keyRingInitialized, _overrideProps
Constructor and Description |
---|
RouterContext(Router router) |
RouterContext(Router router,
Properties envProps) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyCallback(I2PProperties.I2PPropertyCallback callback)
Add a callback, which will fire upon changes in the property
given in the specific callback.
|
FIFOBandwidthLimiter |
bandwidthLimiter()
Coordinate this router's bandwidth limits
|
Blocklist |
blocklist() |
ClientManagerFacade |
clientManager()
How are we coordinating clients for the router?
|
ClientMessagePool |
clientMessagePool()
Where do we toss messages for the clients (and where do we get client messages
to forward on from)?
|
CommSystemFacade |
commSystem()
How do we pass messages from our outNetMessagePool to another router
|
Properties |
getProperties()
Access the configuration attributes of this context, listing the properties
provided during the context construction, as well as the ones included in
System.getProperties.
|
String |
getProperty(String propName)
Tie in the router's config as properties, as well as whatever the
I2PAppContext says.
|
int |
getProperty(String propName,
int defaultVal)
Return an int with an int default
|
String |
getProperty(String propName,
String defaultVal)
Tie in the router's config as properties, as well as whatever the
I2PAppContext says.
|
void |
initAll() |
protected void |
initializeClock() |
protected void |
initializeKeyRing() |
InNetMessagePool |
inNetMessagePool()
Where do we get network messages from (aka where does the comm system dump what
it reads)?
|
InternalClientManager |
internalClientManager()
Use this to connect to the router in the same JVM.
|
boolean |
isRouterContext()
Use this instead of context instanceof RouterContext
|
JobQueue |
jobQueue()
The actual driver of the router, where all jobs are enqueued and processed.
|
KeyManager |
keyManager()
Coordinates the router's ElGamal and DSA keys, as well as any keys given
to it by clients as part of a LeaseSet.
|
KeyRing |
keyRing()
override to support storage in router.config
|
static List<RouterContext> |
listContexts()
Retrieve the list of router contexts currently instantiated in this JVM.
|
MessageHistory |
messageHistory()
Tracker component for monitoring what messages are wrapped in what containers
and how they proceed through the network.
|
OutboundMessageRegistry |
messageRegistry()
The registry is used by outbound messages to wait for replies.
|
MessageStateMonitor |
messageStateMonitor()
The monitor keeps track of inbound and outbound messages currently held in
memory / queued for processing.
|
MessageValidator |
messageValidator()
The router keeps track of messages it receives to prevent duplicates, as
well as other criteria for "validity".
|
NetworkDatabaseFacade |
netDb()
Our db cache
|
OutNetMessagePool |
outNetMessagePool()
Where do we put messages that the router wants to forwards onto the network?
|
PeerManagerFacade |
peerManager()
Minimal interface for selecting peers for various tasks based on given
criteria.
|
ProfileManager |
profileManager()
Expose a simple API for various router components to take note of
particular events that a peer enacts (sends us a message, agrees to
participate in a tunnel, etc).
|
ProfileOrganizer |
profileOrganizer()
Organize the peers we know about into various tiers, profiling their
performance and sorting them accordingly.
|
Router |
router()
what router is this context working for?
|
Hash |
routerHash()
Convenience method for getting the router hash.
|
void |
setProperty(String propName,
String value)
Modify the configuration attributes of this context, changing
one of the properties provided during the context construction.
|
Shitlist |
shitlist()
who does this peer hate?
|
StatisticsManager |
statPublisher()
If the router is configured to, gather up some particularly tasty morsels
regarding the stats managed and offer to publish them into the routerInfo.
|
RouterThrottle |
throttle()
Component to coordinate our accepting/rejecting of requests under load
|
String |
toString() |
TunnelDispatcher |
tunnelDispatcher()
Handle tunnel messages, as well as coordinate the gateways
|
TunnelManagerFacade |
tunnelManager()
Coordinate this router's tunnels (its pools, participation, backup, etc).
|
addShutdownTask, aes, clock, deleteTempDir, dsa, elGamalAESEngine, elGamalEngine, getAppDir, getBaseDir, getBooleanProperty, getBooleanPropertyDefaultTrue, getConfigDir, getCurrentContext, getGlobalContext, getLogDir, getPIDDir, getProperty, getPropertyNames, getRouterDir, getShutdownTasks, getTempDir, hmac, hmac256, keyGenerator, logManager, namingService, random, routingKeyGenerator, sessionKeyManager, sha, statManager
public RouterContext(Router router)
public RouterContext(Router router, Properties envProps)
public void setProperty(String propName, String value)
propName
- The name of the property.value
- The new value for the property.public void addPropertyCallback(I2PProperties.I2PPropertyCallback callback)
I2PAppContext
addPropertyCallback
in class I2PAppContext
callback
- The implementation of the callback.public void initAll()
public static List<RouterContext> listContexts()
public Router router()
public Hash routerHash()
public ClientManagerFacade clientManager()
public ClientMessagePool clientMessagePool()
public InNetMessagePool inNetMessagePool()
public OutNetMessagePool outNetMessagePool()
public MessageHistory messageHistory()
public OutboundMessageRegistry messageRegistry()
public MessageStateMonitor messageStateMonitor()
public NetworkDatabaseFacade netDb()
public JobQueue jobQueue()
public KeyManager keyManager()
public CommSystemFacade commSystem()
public ProfileOrganizer profileOrganizer()
public PeerManagerFacade peerManager()
public ProfileManager profileManager()
public FIFOBandwidthLimiter bandwidthLimiter()
public TunnelManagerFacade tunnelManager()
public TunnelDispatcher tunnelDispatcher()
public StatisticsManager statPublisher()
public Shitlist shitlist()
public Blocklist blocklist()
public MessageValidator messageValidator()
public RouterThrottle throttle()
public String getProperty(String propName)
getProperty
in class I2PAppContext
public String getProperty(String propName, String defaultVal)
getProperty
in class I2PAppContext
public int getProperty(String propName, int defaultVal)
getProperty
in class I2PAppContext
public Properties getProperties()
I2PAppContext
getProperties
in class I2PAppContext
protected void initializeClock()
initializeClock
in class I2PAppContext
public KeyRing keyRing()
keyRing
in class I2PAppContext
protected void initializeKeyRing()
initializeKeyRing
in class I2PAppContext
public boolean isRouterContext()
isRouterContext
in class I2PAppContext
public InternalClientManager internalClientManager()
internalClientManager
in class I2PAppContext