|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.i2p.client.naming.NamingService
net.i2p.client.naming.DummyNamingService
net.i2p.client.naming.MetaNamingService
net.i2p.client.naming.HostsTxtNamingService
public class HostsTxtNamingService
A naming service based on multiple "hosts.txt" files. Supports .b32.i2p and {b64} lookups. Supports caching. All host names are converted to lower case.
| Field Summary | |
|---|---|
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 |
| Fields inherited from class net.i2p.client.naming.MetaNamingService |
|---|
_services |
| 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 | |
|---|---|
HostsTxtNamingService(I2PAppContext context)
The naming service should only be constructed and accessed through the application context. |
|
| Method Summary | |
|---|---|
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 B32 addresses 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 |
| Methods inherited from class net.i2p.client.naming.MetaNamingService |
|---|
addNamingService, getEntries, getNamingServices, registerListener, removeNamingService, reverseLookup, shutdown, size, unregisterListener |
| Methods inherited from class net.i2p.client.naming.DummyNamingService |
|---|
clearCache, getCache, putCache, removeCache |
| Methods inherited from class net.i2p.client.naming.NamingService |
|---|
addNamingService, createInstance, getBase64Entries, getConfiguration, getEntries, getName, getNames, getParent, lookup, lookup, lookupBase32, lookupBase64, put, putAll, putIfAbsent, registerUpdater, remove, requestUpdate, reverseLookup, reverseLookup, setConfiguration, size, start, toString, unregisterUpdater, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_HOSTS_FILE
public static final String DEFAULT_HOSTS_FILE
| Constructor Detail |
|---|
public HostsTxtNamingService(I2PAppContext context)
| Method Detail |
|---|
public Destination lookup(String hostname,
Properties lookupOptions,
Properties storedOptions)
NamingService
lookup 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-null
public boolean put(String hostname,
Destination d,
Properties options)
MetaNamingService
put in class MetaNamingServiceoptions - NamingService-specific, can be null
public boolean putIfAbsent(String hostname,
Destination d,
Properties options)
MetaNamingService
putIfAbsent in class MetaNamingServiceoptions - NamingService-specific, can be null
public boolean remove(String hostname,
Properties options)
MetaNamingService
remove in class MetaNamingServiceoptions - NamingService-specific, can be null
public Set<String> getNames(Properties options)
getNames in class MetaNamingServiceoptions - NamingService-specific, can be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||