Package eu.clarin.sru.client
Interface SRUCallback<V extends eu.clarin.sru.client.SRUAbstractRequest,S extends eu.clarin.sru.client.SRUAbstractResponse<V>>
- 
- Type Parameters:
- V- the request type
- S- the response type
 
 public interface SRUCallback<V extends eu.clarin.sru.client.SRUAbstractRequest,S extends eu.clarin.sru.client.SRUAbstractResponse<V>>A interface for creating asynchronous callbacks for use with theSRUThreadedClient.NB: the callbacks will be executed by any of worker threads of the client. 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonError(V request, SRUClientException error)Invoked when the request yielded an errorvoidonSuccess(S response)Invoked when the request has been completed successfully.
 
- 
- 
- 
Method Detail- 
onSuccessvoid onSuccess(S response) Invoked when the request has been completed successfully.- Parameters:
- response- the response to the request
 
 - 
onErrorvoid onError(V request, SRUClientException error) Invoked when the request yielded an error- Parameters:
- request- the original request
- error- the error
 
 
- 
 
-