Class Connector
java.lang.Object
|
+----Connector
- abstract class Connector
- extends Object
- implements StoreElement
Connectors represent the input and output of a module. Two
Connectors of different modules, but of the same type, can be
connected to each other using a Connection.
- Version:
- $Revision: 1.39 $
- See Also:
- Connector
-
data
- Data that is waiting at this Connector.
-
dataType
- The dataType contains the type information of a Connector.
-
fixedFileName
- The name the user of the Framework specified for the file for the Data
of this Connector.
-
lastFileName
- The name of the file for the Data of this Connector as it was
constructed when the file was last used.
-
module
- The Module this Connector is a part of.
-
userLabel
- The user label is used to make a distinction between 2 in- or
outconnectors that have the same type (DataType).
-
Connector(String, String, Module, DataType)
-
-
connect(Connection)
- Connect this Connector to a new Connection.
-
disconnect()
- Disconnect all Connections from this Connector.
-
disconnect(Connection)
- Disconnect a specified Connection from this Connector.
-
displayError()
- Called to let the Connector display an appropriate message after an
file or Data class could not be read from or written to.
-
fileAvailable()
- Test if file is available for the Data of this Connector.
-
generateFileName()
- Construct a filename from the basename, this Connector's user label,
the logical type (tag) (if present) and physical type (tag) of the
DataType of this Connector.
-
getData()
-
-
getDataType()
- Get the DataType of a Connector.
-
getFixedFileName()
-
-
getModule()
-
-
getUserLabel()
- Get the userlabel of a Connector.
-
isConnected()
- Indicates wether or not this Connector has one (or more) Connections.
-
setData(Data)
- Set the Data this Connector needs.
-
setDataType(DataType)
- Set the DataType of a Connector.
-
setFixedFileName(String)
- Set the name for the file for the Data of this Connector.
-
setUserLabel(String)
- Set the userlabel of a Connector.
-
string2Connector(String[])
- If the MDFile provides a user label store it in this class.
-
toString()
-
userLabel
protected String userLabel
- The user label is used to make a distinction between 2 in- or
outconnectors that have the same type (DataType). Two
in/outconnectors may not have the same type because the all
data streams between modules (which are identified by the
connector types) must have different types.
module
protected Module module
- The Module this Connector is a part of.
dataType
protected DataType dataType
- The dataType contains the type information of a Connector.
So two identical Connectors have two Connector objects and one DataType.
lastFileName
protected String lastFileName
- The name of the file for the Data of this Connector as it was
constructed when the file was last used. The name is either generated
by the Framework using generateFileName(), or specified by the user of
the Framework, in which case it is set using setFixedFileName().
- See Also:
- generateFileName, setFixedFileName, getFixedFileName, fixedFileName
fixedFileName
protected String fixedFileName
- The name the user of the Framework specified for the file for the Data
of this Connector. This variable contains
null
if no
name has been set. The default fixed filename can be found in DataType.
- See Also:
- setFixedFileName, getFixedFileName, lastFileName, defaultFixedFileName
data
protected Data data
- Data that is waiting at this Connector.
null
if there
is no Data waiting.
Connector
Connector(String userLabel,
String fixedFileName,
Module module,
DataType dataType)
- Parameters:
- userLabel - the inital value for the user label.
- module - the module this Connector is a part of.
- dataType - the data type of the Connector.
getUserLabel
String getUserLabel()
- Get the userlabel of a Connector.
setUserLabel
void setUserLabel(String userLabel)
- Set the userlabel of a Connector.
getDataType
DataType getDataType()
- Get the DataType of a Connector.
setDataType
void setDataType(DataType dataType)
- Set the DataType of a Connector.
string2Connector
void string2Connector(String cleanLines[])
- If the MDFile provides a user label store it in this class.
getModule
Module getModule()
- Returns:
- the Module this Connector is part of.
fileAvailable
abstract boolean fileAvailable()
- Test if file is available for the Data of this Connector. The name of
the file is either constructed by the Framework (see generateFileName)
or specified by the user of the Framework using setFixedFileName().
- See Also:
- generateFileName, setFixedFileName
displayError
abstract void displayError()
- Called to let the Connector display an appropriate message after an
file or Data class could not be read from or written to.
setData
abstract void setData(Data data)
- Set the Data this Connector needs.
getData
abstract Data getData()
- Returns:
- the Data for this Connector if any is present,
null
otherwise.
connect
abstract void connect(Connection connection)
- Connect this Connector to a new Connection.
disconnect
abstract void disconnect(Connection connection)
- Disconnect a specified Connection from this Connector. This only
affects this Connector. The Connector at the other end of the
Connection is not changed by this method.
- See Also:
- disconnect
disconnect
abstract void disconnect()
- Disconnect all Connections from this Connector. 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
Connector.
- See Also:
- disconnect
generateFileName
protected String generateFileName()
- Construct a filename from the basename, this Connector's user label,
the logical type (tag) (if present) and physical type (tag) of the
DataType of this Connector. This name is used by the Connector to
save or load Data if no specific name is specified.
- See Also:
- getLogicalTypeTag, getPhysicalTypeTag
setFixedFileName
void setFixedFileName(String name)
- Set the name for the file for the Data of this Connector. If no name
is set, the Framework generates a name using generateFileName().
Specifying
null
or an empty String as a name makes the
name for the file unset.
- See Also:
- generateFileName, getFixedFileName, fixedFileName
getFixedFileName
String getFixedFileName()
- Returns:
- the name for the file for the Data of this Connector as set by
the user of the Framework or
null
if no name has been
set.
- See Also:
- setFixedFileName, fixedFileName
isConnected
abstract boolean isConnected()
- Indicates wether or not this Connector has one (or more) Connections.
toString
public String toString()
- Overrides:
- toString in class Object