Package park :: Package core :: Module wxmonitor :: Class Monitor

Class Monitor

source code


Attach a job monitor to a panel.

The monitor will perform callbacks to onMonitorStart(message), onMonitorProgress(message), etc. if the associated method is defined. If the type specific method is not defined, then the monitor will call onMonitorMessage(message). Otherwise the message is dropped.

See park.monitor for a description of the usual messages.

Instance Methods
 
__init__(self, win)
Window to receive the monitoring events.
source code
 
put(self, message)
Intercept an event received from an asynchronous monitor.
source code
 
dispatch(self, event)
Dispatch the event from the asynchronous monitor.
source code
 
onMonitorMessage(self, message)
Generic message handler: do nothing.
source code
 
onMonitorLog(self, message)
Called when the job sends a logging record.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, win)
(Constructor)

source code 
Window to receive the monitoring events. This is running in the GUI thread.
Overrides: object.__init__

put(self, message)

source code 
Intercept an event received from an asynchronous monitor. This is running in the asynchronous thread.
Overrides: monitor.Monitor.put

dispatch(self, event)

source code 
Dispatch the event from the asynchronous monitor. This is running in the GUI thread.

onMonitorMessage(self, message)

source code 
Generic message handler: do nothing.
Overrides: monitor.Monitor.onMonitorMessage

onMonitorLog(self, message)

source code 

Called when the job sends a logging record.

The logging record contains a normal python logging record.

The default behaviour is to tie into the application logging system using:

logger = logging.getLogger(message.record.name)
logger.handle(message.record)

Logging levels are set in the job controller.

Overrides: monitor.Monitor.onMonitorLog