## page was renamed from Cytoscape_3.0/MonitorDiscussion == Monitor Package Discussion == The idea of a Monitor is an extension of the TaskMonitor used in 2.x era Cytoscape. The TaskMonitor interface has worked reasonably well for us. The only real problem has been the pollution of unrelated interfaces with methods to accept TaskMonitor objects. === Use Cases === * Inform some entity of the status of a task. * Allow sub-tasks to inform a parent TaskMonitor of its status. === Design Ideas === Instead of adding TaskMonitor parameters to methods throughout Cytoscape, I propose defining a Monitorable interface: {{{ public interface Monitorable { public void setMonitor(TaskMonitor tm); public TaskMonitor getMonitor(); } }}} Any class could them implement this interface to signal that it supports updating TaskMonitor objects. You can imagine code like: {{{ ... CyLayoutAlgorithm layout = getLayout("spring"); if ( layout instanceof Monitorable ) (Monitorable)layout.setMonitor(taskMonitor); layout.doLayout(view); ... }}} === Concerns === * The TaskMonitor interface itself needs to be updated to support sub-tasks.