public class HostsTxtNamingService extends MetaNamingService
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HOSTS_FILE
default hosts.txt filenames
|
static String |
PROP_HOSTS_FILE
If this system property is specified, the tunnel will read the
given file for hostname=destKey values when resolving names
|
_servicesBASE32_HASH_LENGTH, CACHE_MAX_SIZE, DEST_SIZE, PROP_B32_context, _listeners, _log, _updaters, PROP_IMPL| Constructor and Description |
|---|
HostsTxtNamingService(I2PAppContext context)
The naming service should only be constructed and accessed through the
application context.
|
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getNames(Properties options)
All services aggregated, unless options contains
the property "file", in which case only for that file
|
Destination |
lookup(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.
|
boolean |
put(String hostname,
Destination d,
Properties options)
Stores in the last service
|
boolean |
putIfAbsent(String hostname,
Destination d,
Properties options)
Stores in the last service
|
boolean |
remove(String hostname,
Properties options)
Removes from all services
|
addNamingService, export, getBase64Entries, getEntries, getNamingServices, registerListener, removeNamingService, reverseLookup, shutdown, size, unregisterListenerclearCache, getCache, putCache, removeCacheaddDestination, addDestination, addNamingService, createInstance, export, getConfiguration, getEntries, getName, getNames, getParent, isB32Host, isBlindedHost, isI2PHost, lookup, lookup, lookupAll, lookupAll, lookupBase32, lookupBase64, put, putAll, putIfAbsent, registerUpdater, remove, remove, remove, requestUpdate, reverseLookup, reverseLookup, reverseLookupAll, reverseLookupAll, reverseLookupAll, setConfiguration, size, start, toString, unregisterUpdater, updatepublic static final String DEFAULT_HOSTS_FILE
public static final String PROP_HOSTS_FILE
public HostsTxtNamingService(I2PAppContext context)
public Set<String> getNames(Properties options)
getNames in class MetaNamingServiceoptions - NamingService-specific, can be nullpublic Destination lookup(String hostname, Properties lookupOptions, Properties storedOptions)
NamingServicelookup in class MetaNamingServicehostname - 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-nullpublic boolean put(String hostname, Destination d, Properties options)
MetaNamingServiceput in class MetaNamingServicehostname - the hostname to addd - the destination for the hostnameoptions - NamingService-specific, can be nullpublic boolean putIfAbsent(String hostname, Destination d, Properties options)
MetaNamingServiceputIfAbsent in class MetaNamingServicehostname - the hostname to addd - the destination for the hostnameoptions - NamingService-specific, can be nullpublic boolean remove(String hostname, Properties options)
MetaNamingServiceremove in class MetaNamingServicehostname - the hostname to removeoptions - NamingService-specific, can be null