Package net.i2p.client.naming
Class EepGetNamingService
java.lang.Object
net.i2p.client.naming.NamingService
net.i2p.client.naming.DummyNamingService
net.i2p.client.naming.EepGetNamingService
- Direct Known Subclasses:
EepGetAndAddNamingService
A network-based naming service using HTTP, with in-memory caching.
Fetches from one or more remote (in-i2p) CGI services using HTTP GET.
The remote HTTP service takes a CGI parameter and must return (only) the
516-byte Base64 destination, or hostname=dest.
A trailing \n or \r\n is acceptable.
Should be used from MetaNamingService, after HostsTxtNamingService.
Cannot be used as the only NamingService! Be sure any naming service hosts
are in hosts.txt.
Supports caching, b32, and b64.
Sample config to put in configadvanced.jsp (restart required):
i2p.naming.impl=net.i2p.client.naming.MetaNamingService
i2p.nameservicelist=net.i2p.client.naming.HostsTxtNamingService,net.i2p.client.naming.EepGetNamingService
i2p.naming.eepget.list=http://namingservice.i2p/cgi-bin/lkup.cgi?host=,http://i2host.i2p/cgi-bin/i2hostquery?
-
Field Summary
Fields inherited from class net.i2p.client.naming.DummyNamingService
BASE32_HASH_LENGTH, CACHE_MAX_SIZE, DEST_SIZE, PROP_B32
Fields inherited from class net.i2p.client.naming.NamingService
_context, _listeners, _log, _updaters, PROP_IMPL
-
Constructor Summary
ConstructorDescriptionEepGetNamingService
(I2PAppContext context) The naming service should only be constructed and accessed through the application context. -
Method Summary
Modifier and TypeMethodDescriptionlookup
(String hostname, Properties lookupOptions, Properties storedOptions) Same as lookup(hostname) but with in and out options Note that whether this (and lookup(hostname)) resolve Base 32 addresses in the form {52 chars}.b32.i2p is NamingService-specific.Methods inherited from class net.i2p.client.naming.DummyNamingService
clearCache, getCache, putCache, removeCache
Methods inherited from class net.i2p.client.naming.NamingService
addDestination, addDestination, addNamingService, addNamingService, createInstance, export, export, getBase64Entries, getConfiguration, getEntries, getEntries, getName, getNames, getNames, getNamingServices, getParent, lookup, lookup, lookupAll, lookupAll, lookupBase32, lookupBase64, put, put, putAll, putIfAbsent, putIfAbsent, registerListener, registerUpdater, remove, remove, remove, remove, removeNamingService, requestUpdate, reverseLookup, reverseLookup, reverseLookup, reverseLookupAll, reverseLookupAll, reverseLookupAll, setConfiguration, shutdown, size, size, start, toString, unregisterListener, unregisterUpdater, update
-
Constructor Details
-
EepGetNamingService
The naming service should only be constructed and accessed through the application context. This constructor should only be used by the appropriate application context itself.
-
-
Method Details
-
lookup
Description copied from class:NamingService
Same as lookup(hostname) but with in and out options Note that whether this (and lookup(hostname)) resolve Base 32 addresses in the form {52 chars}.b32.i2p is NamingService-specific.- Overrides:
lookup
in classDummyNamingService
- Parameters:
hostname
- mixed case as it could be a keylookupOptions
- input parameter, NamingService-specific, can be nullstoredOptions
- output parameter, NamingService-specific, any stored properties will be added if non-null- Returns:
- dest or null
-