public class SingleFileNamingService extends NamingService
_context, _listeners, _log, _updaters, PROP_IMPL
コンストラクタ | 説明 |
---|---|
SingleFileNamingService(I2PAppContext context,
java.lang.String filename) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
export(java.io.Writer out,
java.util.Properties options) |
Overridden for efficiency.
|
java.util.Map<java.lang.String,java.lang.String> |
getBase64Entries(java.util.Properties options) |
Overridden since we store base64 natively.
|
java.util.Map<java.lang.String,Destination> |
getEntries(java.util.Properties options) |
Warning - This will bring the whole database into memory
if options is null, empty, or unsupported, use with caution.
|
java.lang.String |
getName() |
|
java.util.Set<java.lang.String> |
getNames(java.util.Properties options) |
|
Destination |
lookup(java.lang.String hostname,
java.util.Properties lookupOptions,
java.util.Properties storedOptions) |
Will strip a "www." prefix and retry if lookup fails
|
boolean |
put(java.lang.String hostname,
Destination d,
java.util.Properties options) |
Add a hostname and Destination to the addressbook.
|
boolean |
putIfAbsent(java.lang.String hostname,
Destination d,
java.util.Properties options) |
Add a hostname and Destination to the addressbook.
|
boolean |
remove(java.lang.String hostname,
java.util.Properties options) |
Delete the entry.
|
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) |
This implementation returns -1.
|
static void |
writeOptions(java.util.Properties options,
java.io.Writer out) |
Write the subscription options part of the line (including the #!).
|
addDestination, addDestination, addNamingService, addNamingService, createInstance, export, getConfiguration, getEntries, getNames, getNamingServices, getParent, lookup, lookup, lookupAll, lookupAll, lookupBase32, lookupBase64, put, putAll, putIfAbsent, registerListener, registerUpdater, remove, remove, remove, removeNamingService, requestUpdate, reverseLookup, reverseLookup, reverseLookupAll, reverseLookupAll, reverseLookupAll, setConfiguration, size, start, toString, unregisterListener, unregisterUpdater, update
public SingleFileNamingService(I2PAppContext context, java.lang.String filename)
public java.lang.String getName()
getName
クラス内 NamingService
public Destination lookup(java.lang.String hostname, java.util.Properties lookupOptions, java.util.Properties storedOptions)
lookup
クラス内 NamingService
hostname
- case-sensitive; caller should convert to lower caselookupOptions
- ignoredstoredOptions
- ignoredpublic java.lang.String reverseLookup(Destination dest, java.util.Properties options)
NamingService
reverseLookup
クラス内 NamingService
options
- ignoreddest
- non-nullpublic boolean put(java.lang.String hostname, Destination d, java.util.Properties options)
NamingService
put
クラス内 NamingService
hostname
- case-sensitive; caller should convert to lower caseoptions
- if non-null, any prefixed with '=' will be appended
in subscription formatpublic boolean putIfAbsent(java.lang.String hostname, Destination d, java.util.Properties options)
NamingService
putIfAbsent
クラス内 NamingService
hostname
- case-sensitive; caller should convert to lower caseoptions
- if non-null, any prefixed with '=' will be appended
in subscription formatpublic static void writeOptions(java.util.Properties options, java.io.Writer out) throws java.io.IOException
options
- non-nulljava.io.IOException
public boolean remove(java.lang.String hostname, java.util.Properties options)
NamingService
remove
クラス内 NamingService
hostname
- case-sensitive; caller should convert to lower caseoptions
- ignoredpublic java.util.Map<java.lang.String,Destination> getEntries(java.util.Properties options)
NamingService
getEntries
クラス内 NamingService
options
- As follows:
Key "search": return only those matching substring
Key "startsWith": return only those starting with
("[0-9]" allowed)public java.util.Map<java.lang.String,java.lang.String> getBase64Entries(java.util.Properties options)
getBase64Entries
クラス内 NamingService
options
- As follows:
Key "search": return only those matching substring
Key "startsWith": return only those starting with
("[0-9]" allowed)public void export(java.io.Writer out, java.util.Properties options) throws java.io.IOException
export
クラス内 NamingService
options
- ignoredjava.io.IOException
public java.util.Set<java.lang.String> getNames(java.util.Properties options)
getNames
クラス内 NamingService
options
- ignoredpublic int size(java.util.Properties options)
NamingService
size
クラス内 NamingService
options
- ignoredpublic void shutdown()
NamingService
shutdown
クラス内 NamingService