Cytoscape 2.8.0 API

cytoscape.visual.ui
Class RedrawTask

java.lang.Object
  extended by cytoscape.visual.ui.RedrawTask
All Implemented Interfaces:
Haltable, Task, Runnable

public class RedrawTask
extends Object
implements Task


Method Summary
 String getTitle()
          Gets a Human Readable Title of this Task.
 void halt()
          halt() is a non-blocking request to halt the task, and is called by an external entity.
 void run()
          run() executes the task, and is called by an external entity.
 void setTaskMonitor(TaskMonitor taskMonitor)
          Lets this Task know who it should report to regarding task progress, errors, status description, etc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

run

public void run()
Description copied from interface: Task
run() executes the task, and is called by an external entity.

Task process computations should be executed in this method, by the same thread that calls this method.

run() shall only be called once for a given instance. If an asynchronous call to halt() is made while run() is executing, run() should make an effort to abort its operations and exit as soon as it is safe to do so.

Specified by:
run in interface Task
Specified by:
run in interface Runnable

halt

public void halt()
Description copied from interface: Task
halt() is a non-blocking request to halt the task, and is called by an external entity.

halt() should not block; it should return quickly.

If [an asynchronous] thread is executing run() when halt() is called, a signal should be sent to the thread that is executing run() to abort and exit run().

halt() may return long before run() exits; run() will only return when it is safe to do so.

If run() has not been called at the time that halt() is invoked, a later call to run() should not actually "run" anything.

If run() has already been run and has exited by the time halt() is called, halt() should do nothing. There is no guarantee that halt() will be called on an instance of this class.

Specified by:
halt in interface Haltable
Specified by:
halt in interface Task

setTaskMonitor

public void setTaskMonitor(TaskMonitor taskMonitor)
                    throws IllegalThreadStateException
Description copied from interface: Task
Lets this Task know who it should report to regarding task progress, errors, status description, etc. monitor may be null, in which case the task will stop reporting.

This method must be called exactly once, and before run() is invoked.

If this method is called more than once, the method may throw an IllegalStateException.

If this method is not called before run() then run() may throw an IllegalStateException.

TaskMonitor methods can only be be called from the thread that invokes run().

Specified by:
setTaskMonitor in interface Task
Parameters:
taskMonitor - TaskMonitor Object.
Throws:
IllegalThreadStateException - Indicates that the TaskMonitor has already been set.

getTitle

public String getTitle()
Description copied from interface: Task
Gets a Human Readable Title of this Task.

Specified by:
getTitle in interface Task
Returns:
human readable title of task.

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.