Package net.i2p.client.naming
Class LookupDest
- java.lang.Object
- 
- net.i2p.client.naming.LookupDest
 
- 
 public class LookupDest extends Object Connect via I2CP and ask the router to look up the lease of a hash, convert it to a Destination and return it. Obviously this can take a while. All calls are blocking and return null on failure. Timeout is 15 seconds. To do: Add methods that allow specifying the timeout. As of 0.8.3, standard I2PSessions support lookups, including multiple lookups in parallel, and overriding the default timeout. Using an existing I2PSession is much more efficient and flexible than using this class. Public since 0.9.45 only for main(). Not a public API.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedLookupDest(I2PAppContext context)
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static DestinationlookupBase32Hash(I2PAppContext ctx, String key)(package private) static DestinationlookupHostname(I2PAppContext ctx, String hostname)Any hostname, but this is for long-format b32static voidmain(String[] args)Supports hostnames and extended b32.
 
- 
- 
- 
Constructor Detail- 
LookupDestprotected LookupDest(I2PAppContext context) 
 
- 
 - 
Method Detail- 
lookupBase32Hashstatic Destination lookupBase32Hash(I2PAppContext ctx, String key) throws I2PSessionException - Parameters:
- key- 52 chars (do not include the .b32.i2p suffix)
- Throws:
- I2PSessionException
 
 - 
lookupHostnamestatic Destination lookupHostname(I2PAppContext ctx, String hostname) throws I2PSessionException Any hostname, but this is for long-format b32- Parameters:
- hostname- a "b33" hostname, 64+ chars ending with ".b32.i2p"
- Throws:
- I2PSessionException
- Since:
- 0.9.40
 
 - 
mainpublic static void main(String[] args) Supports hostnames and extended b32. TODO: does not support I2CP options.
 
- 
 
-