- java.lang.Object
-
- java.util.EventObject
-
- javax.resource.spi.work.WorkEvent
-
- All Implemented Interfaces:
- Serializable
public class WorkEvent extends EventObject
This class models the various events that occur during the processing of aWork
instance.- Version:
- 1.0
- Author:
- Ram Jeyaraman
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static int
WORK_ACCEPTED
IndicatesWork
instance has been accepted.static int
WORK_COMPLETED
IndicatesWork
instance has completed execution.static int
WORK_REJECTED
IndicatesWork
instance has been rejected.static int
WORK_STARTED
IndicatesWork
instance has started execution.-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor and Description WorkEvent(Object source, int type, Work work, WorkException exc)
Constructor.WorkEvent(Object source, int type, Work work, WorkException exc, long startDuration)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description WorkException
getException()
Return theWorkException
.long
getStartDuration()
Return the start interval duration.int
getType()
Return the type of this event.Work
getWork()
Return theWork
instance which is the cause of the event.
-
-
-
Field Detail
-
WORK_ACCEPTED
public static final int WORK_ACCEPTED
IndicatesWork
instance has been accepted.- See Also:
- Constant Field Values
-
WORK_REJECTED
public static final int WORK_REJECTED
IndicatesWork
instance has been rejected.- See Also:
- Constant Field Values
-
WORK_STARTED
public static final int WORK_STARTED
IndicatesWork
instance has started execution.- See Also:
- Constant Field Values
-
WORK_COMPLETED
public static final int WORK_COMPLETED
IndicatesWork
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
- TheWork
object on which the event occured.exc
- The exception that occured duringWork
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
- TheWork
object on which the event occured.exc
- The exception that occured duringWork
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 theWork
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 theWork
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 theWorkException
. The actualWorkException
subtype returned depends on the type of the event.- Returns:
- a
WorkRejectedException
or aWorkCompletedException
, if any.
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/resource/spi/work/WorkEvent.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.