public class NullClientCallback extends java.lang.Object implements ClientGetCallback, ClientPutCallback
| Constructor and Description |
|---|
NullClientCallback(RequestClient cb) |
| Modifier and Type | Method and Description |
|---|---|
RequestClient |
getRequestClient()
Get the RequestClient context object used to indicate which requests are related to each
other for scheduling purposes.
|
void |
onFailure(FetchException e,
ClientGetter state)
Called on failed/canceled fetch.
|
void |
onFailure(InsertException e,
BaseClientPutter state)
Called on failed/canceled insert.
|
void |
onFetchable(BaseClientPutter state)
Called when the inserted data is fetchable (just a hint, don't rely on this).
|
void |
onGeneratedMetadata(Bucket metadata,
BaseClientPutter state)
Called when we are returning metadata rather than a URI.
|
void |
onGeneratedURI(FreenetURI uri,
BaseClientPutter state)
Called when URI is known (e.g.
|
void |
onResume(ClientContext context)
Called for a persistent request when the node is restarted.
|
void |
onSuccess(BaseClientPutter state)
Called on successful insert.
|
void |
onSuccess(FetchResult result,
ClientGetter state)
Called on successful fetch.
|
public NullClientCallback(RequestClient cb)
public void onFailure(FetchException e, ClientGetter state)
ClientGetCallbackonFailure in interface ClientGetCallbackpublic void onFailure(InsertException e, BaseClientPutter state)
ClientPutCallbackonFailure in interface ClientPutCallbackstate - The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert() (to obtain the Bucket).public void onFetchable(BaseClientPutter state)
ClientPutCallbackonFetchable in interface ClientPutCallbackstate - The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert().public void onGeneratedURI(FreenetURI uri, BaseClientPutter state)
ClientPutCallbackonGeneratedURI in interface ClientPutCallbackstate - The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert().public void onSuccess(FetchResult result, ClientGetter state)
ClientGetCallbackonSuccess in interface ClientGetCallbackpublic void onSuccess(BaseClientPutter state)
ClientPutCallbackonSuccess in interface ClientPutCallbackstate - The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert() (to obtain the Bucket).public void onGeneratedMetadata(Bucket metadata, BaseClientPutter state)
ClientPutCallbackonGeneratedMetadata in interface ClientPutCallbackmetadata - Bucket containing the metadata. Persistent if the insert
is persistent. Recipient may keep it, but must eventually free it. The
caller will not free it.state - The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert().public void onResume(ClientContext context)
ClientBaseCallbackonResume in interface ClientBaseCallbackpublic RequestClient getRequestClient()
ClientBaseCallbackgetRequestClient in interface ClientBaseCallback