HostsTxtNamingService
public class MetaNamingService extends DummyNamingService
修飾子とタイプ | フィールド | 説明 |
---|---|---|
protected java.util.List<NamingService> |
_services |
BASE32_HASH_LENGTH, CACHE_MAX_SIZE, DEST_SIZE, PROP_B32
_context, _listeners, _log, _updaters, PROP_IMPL
コンストラクタ | 説明 |
---|---|
MetaNamingService(I2PAppContext context) |
Adds the services from the i2p.nameservicelist property, in order, as chained services.
|
MetaNamingService(I2PAppContext context,
java.util.List<NamingService> services) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
boolean |
addNamingService(NamingService ns,
boolean head) |
Only for chaining-capable NamingServices.
|
void |
export(java.io.Writer out,
java.util.Properties options) |
All services aggregated.
|
java.util.Map<java.lang.String,java.lang.String> |
getBase64Entries(java.util.Properties options) |
All services aggregated
|
java.util.Map<java.lang.String,Destination> |
getEntries(java.util.Properties options) |
All services aggregated
|
java.util.Set<java.lang.String> |
getNames(java.util.Properties options) |
All services aggregated
|
java.util.List<NamingService> |
getNamingServices() |
This implementation returns null.
|
Destination |
lookup(java.lang.String hostname,
java.util.Properties lookupOptions,
java.util.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(java.lang.String hostname,
Destination d,
java.util.Properties options) |
Stores in the last service
|
boolean |
putIfAbsent(java.lang.String hostname,
Destination d,
java.util.Properties options) |
Stores in the last service
|
void |
registerListener(NamingServiceListener nsl) |
|
boolean |
remove(java.lang.String hostname,
java.util.Properties options) |
Removes from all services
|
boolean |
removeNamingService(NamingService ns) |
Only for chaining-capable NamingServices.
|
java.lang.String |
reverseLookup(Destination dest,
java.util.Properties options) |
Same as reverseLookup(dest) but with options
This implementation returns null.
|
void |
shutdown() |
Parent will call when removed.
|
int |
size(java.util.Properties options) |
All services aggregated
|
void |
unregisterListener(NamingServiceListener nsl) |
clearCache, getCache, putCache, removeCache
addDestination, 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, update
protected final java.util.List<NamingService> _services
public MetaNamingService(I2PAppContext context)
public MetaNamingService(I2PAppContext context, java.util.List<NamingService> services)
services
- if non-null, services to be added. If null, this will only handle b32 and b64,
until addNamingService() is called later.public boolean addNamingService(NamingService ns, boolean head)
NamingService
addNamingService
クラス内 NamingService
head
- or tailpublic java.util.List<NamingService> getNamingServices()
NamingService
getNamingServices
クラス内 NamingService
public boolean removeNamingService(NamingService ns)
NamingService
removeNamingService
クラス内 NamingService
public void registerListener(NamingServiceListener nsl)
registerListener
クラス内 NamingService
public void unregisterListener(NamingServiceListener nsl)
unregisterListener
クラス内 NamingService
public Destination lookup(java.lang.String hostname, java.util.Properties lookupOptions, java.util.Properties storedOptions)
NamingService
lookup
クラス内 DummyNamingService
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-nullpublic java.lang.String reverseLookup(Destination dest, java.util.Properties options)
NamingService
reverseLookup
クラス内 NamingService
dest
- non-nulloptions
- NamingService-specific, can be nullpublic boolean put(java.lang.String hostname, Destination d, java.util.Properties options)
put
クラス内 NamingService
options
- NamingService-specific, can be nullpublic boolean putIfAbsent(java.lang.String hostname, Destination d, java.util.Properties options)
putIfAbsent
クラス内 NamingService
options
- NamingService-specific, can be nullpublic boolean remove(java.lang.String hostname, java.util.Properties options)
remove
クラス内 NamingService
options
- NamingService-specific, can be nullpublic java.util.Map<java.lang.String,Destination> getEntries(java.util.Properties options)
getEntries
クラス内 NamingService
options
- NamingService-specific, can be nullpublic java.util.Map<java.lang.String,java.lang.String> getBase64Entries(java.util.Properties options)
getBase64Entries
クラス内 NamingService
options
- NamingService-specific, can be nullpublic java.util.Set<java.lang.String> getNames(java.util.Properties options)
getNames
クラス内 NamingService
options
- NamingService-specific, can be nullpublic void export(java.io.Writer out, java.util.Properties options) throws java.io.IOException
export
クラス内 NamingService
options
- NamingService-specific, can be nulljava.io.IOException
public int size(java.util.Properties options)
size
クラス内 NamingService
options
- NamingService-specific, can be nullpublic void shutdown()
NamingService
shutdown
クラス内 NamingService