org.semanticweb.owlapi.util
Interface Monitorable


public interface Monitorable

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 04-Jan-2007

Certain tasks or algorithms may take some time to accomplish. For example parsing, saving etc. In some situations, it is desirable to monitor the progress of such tasks, for example to provide feedback in user interfaces. Interfaces which represent long tasks can implement this progress monitor interface to provide a hook for a progress monitor.


Method Summary
 boolean canInterrupt()
          Determines if this long running task can be cancelled.
 void interrupt()
          Interrupts the long running task (if possible).
 void setProgressMonitor(ProgressMonitor progressMonitor)
          Sets the progress monitor which receives information about the progress of the this object which represents a long running task.
 

Method Detail

setProgressMonitor

void setProgressMonitor(ProgressMonitor progressMonitor)
Sets the progress monitor which receives information about the progress of the this object which represents a long running task.

Parameters:
progressMonitor -

interrupt

void interrupt()
               throws java.lang.InterruptedException
Interrupts the long running task (if possible).

Throws:
java.lang.InterruptedException

canInterrupt

boolean canInterrupt()
Determines if this long running task can be cancelled.