java.lang.Object
net.i2p.client.impl.LkupResult
- All Implemented Interfaces:
LookupResult
Return value of
I2PSession.lookupDest2(String, long).Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intResult code from the lookup.private final DestinationThe destination found, null if there was none.private final intNonce echoed back to the requester.Fields inherited from interface LookupResult
RESULT_DECRYPTION_FAILURE, RESULT_DEFERRED, RESULT_FAILURE, RESULT_KEY_REQUIRED, RESULT_SECRET_AND_KEY_REQUIRED, RESULT_SECRET_REQUIRED, RESULT_SUCCESSModifier and TypeFieldDescriptionstatic final intB33 requires per-client auth private key, the router has a key, but decryption failed; please supply a new key in a blinding info message.static final intFor async calls only.static final intGeneral failure, probably a local hostname lookup failure, or a b32 lookup timeout.static final intB33 requires per-client auth private key but the router does not have it cached; please supply in a blinding info message.static final intB33 requires a lookup password and per-client auth private key but the router does not have them cached; please supply in a blinding info message.static final intB33 requires a lookup password but the router does not have it cached; please supply in a blinding info message.static final intSuccessful lookup;LookupResult.getDestination()will be non-null.Constructor Summary
ConstructorsConstructorDescriptionLkupResult(int nonce) Holds the deferred result code, carrying only the nonce of the pending reply.LkupResult(int code, Destination dest) Lkup result.LkupResult(int code, Destination dest, int nonce) Full constructor.Method Summary
All MethodsModifier and TypeMethodDescriptionDestination found by the lookup.intgetNonce()For async calls only.intResult code of the lookup.
Field Details
_code
private final int _codeResult code from the lookup._dest
The destination found, null if there was none._nonce
private final int _nonceNonce echoed back to the requester.
Constructor Details
LkupResult
LkupResult(int code, Destination dest) Lkup result.- Parameters:
code- the LookupResult result code: zero on success, nonzero on failuredest- the destination the lookup resolved to, null when it failed
LkupResult
LkupResult(int nonce) Holds the deferred result code, carrying only the nonce of the pending reply.- Parameters:
nonce- the nonce to carry on the deferred reply
LkupResult
LkupResult(int code, Destination dest, int nonce) Full constructor.- Parameters:
code- zero for success, nonzero for failure, or RESULT_DEFERRED for a reply still pendingdest- destination found by the lookup, or null on failure or while deferrednonce- the nonce of the reply this result answers
Method Details
getResultCode
public int getResultCode()Result code of the lookup.- Specified by:
getResultCodein interfaceLookupResult- Returns:
- zero for success, nonzero for failure
getDestination
Destination found by the lookup.- Specified by:
getDestinationin interfaceLookupResult- Returns:
- the destination on success, null on failure
getNonce
public int getNonce()For async calls only. Nonce will be non-zero. Callback called later with final result and same nonce.- Specified by:
getNoncein interfaceLookupResult- Returns:
- the nonzero token supplied to the async lookup and handed back to the callback, for correlating the reply with the request