|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.client.naming.NamingService
public abstract class NamingService
Naming services create a subclass of this class.
Field Summary | |
---|---|
protected I2PAppContext |
_context
|
protected static long |
CACHE_MAX_AGE
Don't know why a dest would ever change but keep this short anyway |
protected static int |
CACHE_MAX_SIZE
|
static java.lang.String |
PROP_IMPL
what classname should be used as the naming service impl? |
Constructor Summary | |
---|---|
protected |
NamingService(I2PAppContext context)
The naming service should only be constructed and accessed through the application context. |
Method Summary | |
---|---|
static NamingService |
createInstance(I2PAppContext context)
Get a naming service instance. |
protected Destination |
getCache(java.lang.String s)
|
abstract Destination |
lookup(java.lang.String hostname)
Look up a host name. |
protected Destination |
lookupBase64(java.lang.String hostname)
Check if host name is valid Base64 encoded dest and return this dest in that case. |
protected void |
putCache(java.lang.String s,
Destination d)
|
java.lang.String |
reverseLookup(Destination dest)
Reverse look up a destination |
java.lang.String |
reverseLookup(Hash h)
Deprecated. unused |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected I2PAppContext _context
public static final java.lang.String PROP_IMPL
protected static final int CACHE_MAX_SIZE
protected static final long CACHE_MAX_AGE
Constructor Detail |
---|
protected NamingService(I2PAppContext context)
Method Detail |
---|
public abstract Destination lookup(java.lang.String hostname)
null
if name is unknown.public java.lang.String reverseLookup(Destination dest)
null
if none is known. It is safe for subclasses to always return
null
if no reverse lookup is possible.public java.lang.String reverseLookup(Hash h)
protected Destination lookupBase64(java.lang.String hostname)
public static final NamingService createInstance(I2PAppContext context)
protected void putCache(java.lang.String s, Destination d)
protected Destination getCache(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |