public class HostsTxtNamingService extends MetaNamingService
| Modifier and Type | Field | 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
|
BASE32_HASH_LENGTH, CACHE_MAX_SIZE, DEST_SIZE, PROP_B32_services_context, _listeners, _log, _updaters, PROP_IMPL| Constructor | Description |
|---|---|
HostsTxtNamingService(I2PAppContext context) |
The naming service should only be constructed and accessed through the
application context.
|
| Modifier and Type | Method | 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
|
clearCache, getCache, putCache, removeCacheaddNamingService, export, getBase64Entries, getEntries, getNamingServices, registerListener, removeNamingService, reverseLookup, shutdown, size, unregisterListeneraddDestination, addDestination, addNamingService, createInstance, export, getConfiguration, getEntries, getName, getNames, getParent, 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 PROP_HOSTS_FILE
public static final String DEFAULT_HOSTS_FILE
public HostsTxtNamingService(I2PAppContext context)
public 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 MetaNamingServiceoptions - NamingService-specific, can be nullpublic boolean putIfAbsent(String hostname, Destination d, Properties options)
MetaNamingServiceputIfAbsent in class MetaNamingServiceoptions - NamingService-specific, can be nullpublic boolean remove(String hostname, Properties options)
MetaNamingServiceremove in class MetaNamingServiceoptions - NamingService-specific, can be nullpublic Set<String> getNames(Properties options)
getNames in class MetaNamingServiceoptions - NamingService-specific, can be null