Class OutConnector
java.lang.Object
|
+----Connector
|
+----OutConnector
- class OutConnector
- extends Connector
Outconnectors are those connectors of a module that provide
the output of a module.
- Version:
- $Revision: 1.30 $
-
classLoadResult
- The result of the last try to load a class file by
loadData().
-
connections
- The Connections that are connected to this OutConnector.
-
display
- Indicates wether the output associated with this OutConnector must be
displayed or not.
-
fileSaveResult
- The result of the last try by saveData()to have a Data class
save a file.
-
lastDataSaveError
- The result of the fileAvailable check that is performed before the
modules are run.
-
save
- Indicates wether the output associated with this OutConnector must be
stored on disk or not.
-
OutConnector(String, String, Module, DataType)
-
-
connect(Connection)
- Connect this OutConnector to a new Connection.
-
disconnect()
- Disconnect all Connections from this OutConnector.
-
disconnect(Connection)
- Disconnect a specified Connection from this OutConnector.
-
displayData()
- Displays the Data associated with this OutConnector if this
OutConnector's display option is on (
true).
-
displayError()
- The file was not accessible for writing, and was needed.
-
fileAvailable()
- Tests if the OutConnector will be able to store its data in a file, if
it needs to.
-
getConnections()
-
-
getData()
-
-
getDefaultDisplay()
-
-
getDefaultSave()
-
-
getDisplay()
-
-
getSave()
-
-
isConnected()
- Indicates wether or not this Connector has one (or more) Connections.
-
saveData()
- Store the Data of this OutConnector, if the save option is on.
-
setData(Data)
- Set the Data this Connector needs.
-
setDisplay(boolean)
- Set the "display option" of this OutConnector, which indicates wether
the output associated with this OutConnector must be displayed or not.
-
setSave(boolean)
- Set the "save option" of this OutConnector, which indicates wether the
output associated with this OutConnector must be stored on disk or
not.
save
private boolean save
- Indicates wether the output associated with this OutConnector must be
stored on disk or not.
display
private boolean display
- Indicates wether the output associated with this OutConnector must be
displayed or not.
connections
private ConnectionStore connections
- The Connections that are connected to this OutConnector.
classLoadResult
private ClassLoadResult classLoadResult
- The result of the last try to load a class file by
loadData(). It is set by fileAvailable() and used by
displayError().
- See Also:
- fileAvailable, displayError
fileSaveResult
private FileSaveResult fileSaveResult
- The result of the last try by saveData()to have a Data class
save a file. It is set by saveData() and used by
displayError().
- See Also:
- saveData, displayError
lastDataSaveError
private String lastDataSaveError
- The result of the fileAvailable check that is performed before the
modules are run.
OutConnector
OutConnector(String userLabel,
String fixedFileName,
Module module,
DataType dataType)
- See Also:
- Connector
fileAvailable
boolean fileAvailable()
- Tests if the OutConnector will be able to store its data in a file, if
it needs to. Returns
true in the following situations:
- the file exists, is a normal file and is writable.
- the
file does not exist, but the directory in which it is to be created
exists and is writable.
- the OutConnector does not need to save
Data, because its save option is
false.
Returns
false otherwise. Uses fixedFileName, the name that is
specified by the user of the Framework, or, if it is not set,
generates a filename using method generateFileName().
- Overrides:
- fileAvailable in class Connector
- See Also:
- fixedFileName, generateFileName, fileAvailable
displayError
void displayError()
- The file was not accessible for writing, and was needed. Show
an approriate message. Can also be called if the actual writing
failed.
- Overrides:
- displayError in class Connector
setSave
void setSave(boolean save)
- Set the "save option" of this OutConnector, which indicates wether the
output associated with this OutConnector must be stored on disk or
not.
getSave
boolean getSave()
- Returns:
- wether the output associated with this OutConnector must be
stored on disk or not.
setData
void setData(Data data)
- Set the Data this Connector needs.
- Overrides:
- setData in class Connector
getData
Data getData()
- Returns:
- the Data that last went through the Connections of this
OutConnector or was last set using setData().
null if no Data could be found.
- Overrides:
- getData in class Connector
- See Also:
- setData
saveData
boolean saveData()
- Store the Data of this OutConnector, if the save option is on.
- Returns:
-
true if the Data is successfully saved or if the
Data does not need to be saved because the save option is
false. false if an error occurred
while trying to save the Data. The OutConnector remembers any
error and can give details via method displayError().
- See Also:
- getSave, setSave, save, displayError
getConnections
ConnectionStore getConnections()
connect
void connect(Connection connection)
- Connect this OutConnector to a new Connection.
- Overrides:
- connect in class Connector
disconnect
void disconnect(Connection connection)
- Disconnect a specified Connection from this OutConnector. This only
affects this OutConnector. The InConnector at the other end of the
Connection is not changed by this method.
- Overrides:
- disconnect in class Connector
- See Also:
- disconnect
disconnect
void disconnect()
- Disconnect all Connections from this OutConnector. No Connector is
directly affected by this method, because it only calls the method
disconnect() on each Connection. As a result of that call, the
Connections may call the disconnect(Connection) method of this
OutConnector.
- Overrides:
- disconnect in class Connector
- See Also:
- disconnect
setDisplay
void setDisplay(boolean display)
- Set the "display option" of this OutConnector, which indicates wether
the output associated with this OutConnector must be displayed or not.
getDisplay
boolean getDisplay()
- Returns:
- wether the output associated with this OutConnector must be
displayed or not.
getDefaultSave
boolean getDefaultSave()
- Returns:
- the default value for the save option. Currently, the default
value is
false.
getDefaultDisplay
boolean getDefaultDisplay()
- Returns:
- the default value for the display option. Currently, the
default value is
false.
displayData
DataVisualisation displayData()
- Displays the Data associated with this OutConnector if this
OutConnector's display option is on (
true).
- Returns:
- the DataVisualisation object that was returned by the display
method of the Data object, or
null if this OutConnector
does not display its result.
- See Also:
- getDisplay, setDisplay
isConnected
boolean isConnected()
- Indicates wether or not this Connector has one (or more) Connections.
- Overrides:
- isConnected in class Connector