edu.ksu.cis.bandera.tool
Interface DisconnectableTool

All Superinterfaces:
edu.ksu.cis.bandera.util.Observable, Tool

public interface DisconnectableTool
extends Tool

The DisconnectableTool interface is provided for tools that wish to provide the ability for the user to request that the tool stop processing in such a way as to allow it to restart again at the same state as it finished. A DisconnectableTool will likely be used in the following manner:

Version:
$Revision: 1.2 $ - $Date: 2003/08/06 15:30:47 $
Author:
Todd Wallentine tcw AT cis ksu edu

Method Summary
 void connect(edu.ksu.cis.bandera.tool.ToolMomento toolMomento)
          Connect this tool using the given ToolMomento as the start state.
 edu.ksu.cis.bandera.tool.ToolMomento createToolMomento()
          Create a ToolMomento for this type of tool.
 edu.ksu.cis.bandera.tool.ToolMomento disconnect()
          Disconnect this tool and return it's current state in the form of a ToolMomento
 
Methods inherited from interface edu.ksu.cis.bandera.tool.Tool
getConfiguration, getInputParameterList, getOutputMap, getOutputParameterList, getToolConfigurationView, getToolIconView, quit, run, setConfiguration, setInputMap
 
Methods inherited from interface edu.ksu.cis.bandera.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, resumeObservers, suspendObservers
 

Method Detail

disconnect

public edu.ksu.cis.bandera.tool.ToolMomento disconnect()
                                                throws java.lang.Exception
Disconnect this tool and return it's current state in the form of a ToolMomento

Returns:
The current state in the form of a ToolMomento.
Throws:
java.lang.Exception - An Exception should be thrown when an error occurs during disconnection.

connect

public void connect(edu.ksu.cis.bandera.tool.ToolMomento toolMomento)
             throws java.lang.Exception
Connect this tool using the given ToolMomento as the start state.

Parameters:
toolMomento - The start state for this tool.
Throws:
java.lang.Exception - An Exception should be thrown when an error occurs during connection. This might include problems with the ToolMomento (in type or with the values in it).

createToolMomento

public edu.ksu.cis.bandera.tool.ToolMomento createToolMomento()
Create a ToolMomento for this type of tool.

Returns:
A new, empty ToolMomento that can be initialized to a particular state.