javax.resource.spi.work

Class WorkEvent

  • All Implemented Interfaces:
    Serializable

    public class WorkEvent
    extends EventObject
    This class models the various events that occur during the processing of a Work instance.
    Version:
    1.0
    Author:
    Ram Jeyaraman
    See Also:
    Serialized Form
    • Field Detail

      • WORK_ACCEPTED

        public static final int WORK_ACCEPTED
        Indicates Work instance has been accepted.
        See Also:
        Constant Field Values
      • WORK_REJECTED

        public static final int WORK_REJECTED
        Indicates Work instance has been rejected.
        See Also:
        Constant Field Values
      • WORK_STARTED

        public static final int WORK_STARTED
        Indicates Work instance has started execution.
        See Also:
        Constant Field Values
      • WORK_COMPLETED

        public static final int WORK_COMPLETED
        Indicates Work instance has completed execution.
        See Also:
        Constant Field Values
    • Constructor Detail

      • WorkEvent

        public WorkEvent(Object source,
                         int type,
                         Work work,
                         WorkException exc)
        Constructor.
        Parameters:
        source - The object on which the event initially occurred.
        type - The event type.
        work - The Work object on which the event occured.
        exc - The exception that occured during Work processing.
      • WorkEvent

        public WorkEvent(Object source,
                         int type,
                         Work work,
                         WorkException exc,
                         long startDuration)
        Constructor.
        Parameters:
        source - The object on which the event initially occurred.
        type - The event type.
        work - The Work object on which the event occured.
        exc - The exception that occured during Work processing.
        startDuration - The start delay duration (in milliseconds).
    • Method Detail

      • getType

        public int getType()
        Return the type of this event.
        Returns:
        the event type.
      • getWork

        public Work getWork()
        Return the Work instance which is the cause of the event.
        Returns:
        the Work instance.
      • getStartDuration

        public long getStartDuration()
        Return the start interval duration.
        Returns:
        the time elapsed (in milliseconds) since the Work was accepted, until the Work execution started. Note, this does not offer real-time guarantees. It is valid to return -1, if the actual start interval duration is unknown.
      • getException

        public WorkException getException()
        Return the WorkException. The actual WorkException subtype returned depends on the type of the event.
        Returns:
        a WorkRejectedException or a WorkCompletedException, if any.

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 13:04:06 Cette version de la page est en cache (à la date du 21/08/2025 13:04:06) 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 24/12/2007, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/resource/spi/work/WorkEvent.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, WorkEvent (Java(TM) EE 7 Specification APIs)

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.