Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
berry::IJobChangeListener Struct Referenceabstract

#include <berryIJobChangeListener.h>

Classes

struct  Events
 

Public Member Functions

virtual Events::Types GetEventTypes ()=0
 
virtual void AboutToRun (const IJobChangeEvent::ConstPointer &)
 
virtual void Awake (const IJobChangeEvent::ConstPointer &)
 
virtual void Done (const IJobChangeEvent::ConstPointer &)
 
virtual void Running (const IJobChangeEvent::ConstPointer &)
 
virtual void Scheduled (const IJobChangeEvent::ConstPointer &)
 
virtual void Sleeping (const IJobChangeEvent::ConstPointer &)
 

Detailed Description

Callback interface for clients interested in being notified when jobs change state.

A single job listener instance can be added either to the job manager, for notification of all scheduled jobs, or to any set of individual jobs. A single listener instance should not be added to both the job manager, and to individual jobs (such a listener may receive duplicate notifications).

Clients should not rely on the result of the Job::GetState() method on jobs for which notification is occurring. Listeners are notified of all job state changes, but whether the state change occurs before, during, or after listeners are notified is unspecified.

Clients may implement this interface.

See also
IJobManager::AddJobChangeListener(IJobChangeListener::Pointer)
IJobManager::RemoveJobChangeListener(IJobChangeListener::Pointer)
Job::AddJobChangeListener(IJobChangeListener::Pointer)
Job::GetState()
Job::RemoveJobChangeListener(IJobChangeListener::Pointer)

Definition at line 43 of file berryIJobChangeListener.h.

Member Function Documentation

◆ AboutToRun()

virtual void berry::IJobChangeListener::AboutToRun ( const IJobChangeEvent::ConstPointer )
inlinevirtual

Notification that a job is about to be run. Listeners are allowed to sleep, cancel, or change the priority of the job before it is started (and as a result may prevent the run from actually occurring).

Definition at line 89 of file berryIJobChangeListener.h.

◆ Awake()

virtual void berry::IJobChangeListener::Awake ( const IJobChangeEvent::ConstPointer )
inlinevirtual

Notification that a job was previously sleeping and has now been rescheduled to run.

Definition at line 97 of file berryIJobChangeListener.h.

◆ Done()

virtual void berry::IJobChangeListener::Done ( const IJobChangeEvent::ConstPointer )
inlinevirtual

Notification that a job has completed execution, either due to cancelation, successful completion, or failure. The event status object indicates how the job finished, and the reason for failure, if applicable.

Definition at line 106 of file berryIJobChangeListener.h.

◆ GetEventTypes()

virtual Events::Types berry::IJobChangeListener::GetEventTypes ( )
pure virtual

◆ Running()

virtual void berry::IJobChangeListener::Running ( const IJobChangeEvent::ConstPointer )
inlinevirtual

Notification that a job has started running.

Definition at line 113 of file berryIJobChangeListener.h.

◆ Scheduled()

virtual void berry::IJobChangeListener::Scheduled ( const IJobChangeEvent::ConstPointer )
inlinevirtual

Notification that a job is being added to the queue of scheduled jobs. The event details includes the scheduling delay before the job should start running.

Definition at line 122 of file berryIJobChangeListener.h.

◆ Sleeping()

virtual void berry::IJobChangeListener::Sleeping ( const IJobChangeEvent::ConstPointer )
inlinevirtual

Notification that a job was waiting to run and has now been put in the sleeping state.

Definition at line 130 of file berryIJobChangeListener.h.


The documentation for this struct was generated from the following file: