Package net.i2p.client.naming
Class DummyNamingService
java.lang.Object
net.i2p.client.naming.NamingService
net.i2p.client.naming.DummyNamingService
- Direct Known Subclasses:
BlockfileNamingService,EepGetNamingService,MetaNamingService
A Dummy naming service that can only handle base64 and b32 destinations.
- Since:
- public since 0.9.31
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intstatic final intstatic final StringFields inherited from class net.i2p.client.naming.NamingService
_context, _listeners, _log, _updaters, PROP_IMPL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDummyNamingService(I2PAppContext context) The naming service should only be constructed and accessed through the application context. -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidprotected static Destinationlookup(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.protected static voidputCache(String s, Destination d) Provide basic static caching for all servicesprotected static voidMethods inherited from class net.i2p.client.naming.NamingService
addDestination, addDestination, addNamingService, addNamingService, createInstance, export, export, getBase64Entries, getConfiguration, getEntries, getEntries, getName, getNames, getNames, getNamingServices, getParent, isB32Host, isBlindedHost, isI2PHost, 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
-
Field Details
-
BASE32_HASH_LENGTH
protected static final int BASE32_HASH_LENGTH- See Also:
-
PROP_B32
- See Also:
-
CACHE_MAX_SIZE
protected static final int CACHE_MAX_SIZE -
DEST_SIZE
public static final int DEST_SIZE- See Also:
-
-
Constructor Details
-
DummyNamingService
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:NamingServiceSame 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.- Specified by:
lookupin classNamingService- 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
- Since:
- 0.8.7
-
putCache
Provide basic static caching for all services- Parameters:
s- case-sensitive, could be a hostname or a full b64 string
-
getCache
- Parameters:
s- case-sensitive, could be a hostname or a full b64 string- Returns:
- cached dest or null
-
removeCache
- Parameters:
s- case-sensitive, could be a hostname or a full b64 string- Since:
- 0.8.7
-
clearCache
protected static void clearCache()- Since:
- 0.8.1
-