java.nio.channels

Interface CompletionHandler<V,A>

  • Type Parameters:
    V - The result type of the I/O operation
    A - The type of the object attached to the I/O operation

    public interface CompletionHandler<V,A>
    A handler for consuming the result of an asynchronous I/O operation.

    The asynchronous channels defined in this package allow a completion handler to be specified to consume the result of an asynchronous operation. The completed method is invoked when the I/O operation completes successfully. The failed method is invoked if the I/O operations fails. The implementations of these methods should complete in a timely manner so as to avoid keeping the invoking thread from dispatching to other completion handlers.

    Since:
    1.7
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void completed(V result, A attachment)
      Invoked when an operation has completed.
      void failed(Throwable exc, A attachment)
      Invoked when an operation fails.

        

    • Method Detail

      • completed

        void completed(V result,
                     A attachment)
        Invoked when an operation has completed.
        Parameters:
        result - The result of the I/O operation.
        attachment - The object attached to the I/O operation when it was initiated.
      • failed

        void failed(Throwable exc,
                  A attachment)
        Invoked when an operation fails.
        Parameters:
        exc - The exception to indicate why the I/O operation failed
        attachment - The object attached to the I/O operation when it was initiated.

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.

Document créé le 11/06/2005, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/nio/channels/CompletionHandler.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

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com

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.

Table des matières Haut