Medical Imaging Interaction Toolkit  2016.11.0
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 47 of file berryIJobChangeListener.h.

Member Function Documentation

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).

Parameters
eventthe event details

Definition at line 95 of file berryIJobChangeListener.h.

Referenced by berry::IJobChangeListener::Events::AddListener(), and berry::IJobChangeListener::Events::RemoveListener().

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

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

Parameters
eventthe event details

Definition at line 105 of file berryIJobChangeListener.h.

Referenced by berry::IJobChangeListener::Events::AddListener(), and berry::IJobChangeListener::Events::RemoveListener().

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.

Parameters
eventthe event details

Definition at line 116 of file berryIJobChangeListener.h.

Referenced by berry::IJobChangeListener::Events::AddListener(), and berry::IJobChangeListener::Events::RemoveListener().

virtual Events::Types berry::IJobChangeListener::GetEventTypes ( )
pure virtual
virtual void berry::IJobChangeListener::Running ( const IJobChangeEvent::ConstPointer )
inlinevirtual

Notification that a job has started running.

Parameters
eventthe event details

Definition at line 125 of file berryIJobChangeListener.h.

Referenced by berry::IJobChangeListener::Events::AddListener(), and berry::IJobChangeListener::Events::RemoveListener().

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.

Parameters
eventthe event details, including the job instance and the scheduling delay

Definition at line 137 of file berryIJobChangeListener.h.

Referenced by berry::IJobChangeListener::Events::AddListener(), and berry::IJobChangeListener::Events::RemoveListener().

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.

Parameters
eventthe event details

Definition at line 147 of file berryIJobChangeListener.h.

Referenced by berry::IJobChangeListener::Events::AddListener(), and berry::IJobChangeListener::Events::RemoveListener().


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