-
- Type Parameters:
RESPONSE
- response type. It can be either a general-purposeResponse
or the anticipated response entity type.
public interface InvocationCallback<RESPONSE>
Callback that can be implemented to receive the asynchronous processing events from the invocation processing.- Since:
- 2.0
- Author:
- Marek Potociar
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
completed(RESPONSE response)
Called when the invocation was successfully completed.void
failed(Throwable throwable)
Called when the invocation has failed for any reason.
-
-
-
Method Detail
-
completed
void completed(RESPONSE response)
Called when the invocation was successfully completed. Note that this does not necessarily mean the response has bean fully read, which depends on the parameterized invocation callback response type.Once this invocation callback method returns, the underlying
Response
instance will be automatically closed by the runtime.- Parameters:
response
- response data.
-
failed
void failed(Throwable throwable)
Called when the invocation has failed for any reason.Note that the provided
Throwable
may be aProcessingException
in case the invocation processing failure has been caused by a client-side runtime component error. TheThrowable
may also be aWebApplicationException
or one of its subclasses in case the response status code is notsuccessful
and the generic callback type is notResponse
. In case a processing of a properly received response fails, the wrapped processing exception will be ofResponseProcessingException
type and will contain theResponse
instance whose processing has failed. ACancellationException
would be indicate that the invocation has been cancelled. AnInterruptedException
would indicate that the thread executing the invocation has been interrupted.Once this invocation callback method returns, the underlying
Response
instance will be automatically closed by the runtime.- Parameters:
throwable
- contains failure details.
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 20:48:08 Cette version de la page est en cache (à la date du 21/08/2025 20:48:08) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/ws/rs/client/InvocationCallback.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.