All Packages Class Hierarchy This Package Previous Next Index
Class Abstract.Connection
Abstract.Connection
- public abstract class Connection
Abstract class for Connection. The connection includes ServerThread and ReceiverThread.
Although the JATLite only provide the TCP/IP based connection, you may extend UDP or
other protocols by modifing this class.
- See Also:
- ReceiverThread, ServerThread
-
_connections
- ConnectionTable, which contains the running receiver thread information
-
_durationTime
- Maximum idle time.
-
_endWith
- endWith character, may be dependent upon the implementation
-
_myaddress
- Address which represent my(agent) address
-
_security
- Data member to manage register and connection
-
Connection()
- Default Constructor
-
Connection(String)
- Set Connection name(which is identical to the agent name)
-
Connection(ThreadGroup, String)
- Constructor with thread group
-
endConn()
- Disconnect connection
-
getAddress()
- Get Connection address
-
getConnectionTable()
- Get ConnectionTable
-
getEndWith()
- Accessor to get endWith character
-
getSecurity()
- Get Security object
-
setAddress(Address)
- Set my address
-
setConnectionTable(ConnectionTable)
- Set ConnectionTable for Connection object
-
setDurationTime(int)
- Set duration time as a measure of minutes.
-
setEndWith(char)
- Set EndWith character.
-
setSecurity(Security)
- Set Security object
_connections
protected ConnectionTable _connections
- ConnectionTable, which contains the running receiver thread information
- See Also:
- ConnectionTable
_myaddress
protected Address _myaddress
- Address which represent my(agent) address
- See Also:
- Address
_security
protected Security _security
- Data member to manage register and connection
- See Also:
- Security
_endWith
protected char _endWith
- endWith character, may be dependent upon the implementation
_durationTime
protected int _durationTime
- Maximum idle time. Default is no setting. You can set duration time
using setDurationTime(long). Unit is minute.
Connection
public Connection()
- Default Constructor
Connection
public Connection(String name)
- Set Connection name(which is identical to the agent name)
Connection
public Connection(ThreadGroup g,
String name)
- Constructor with thread group
setEndWith
public void setEndWith(char c)
- Set EndWith character. Note that the endWith character is not
passed to the constructor. You can set endWith character at any time
if your endWith character is different from '\004'
- Parameters:
- c - EndWith character to be set to send/receive message
getEndWith
public char getEndWith()
- Accessor to get endWith character
setAddress
public void setAddress(Address myaddress)
- Set my address
- Parameters:
- myaddress - My address object
getAddress
public Address getAddress()
- Get Connection address
- Returns:
- My address
setConnectionTable
public void setConnectionTable(ConnectionTable ctable)
- Set ConnectionTable for Connection object
- Parameters:
- ctable - ConnectionTable
getConnectionTable
public ConnectionTable getConnectionTable()
- Get ConnectionTable
- Returns:
- Connection's ConnectionTable
setSecurity
public synchronized void setSecurity(Security security) throws ConnectionException
- Set Security object
- Parameters:
- security - Security object
getSecurity
public Security getSecurity()
- Get Security object
- Returns:
- Security object, the connection object are using
setDurationTime
public abstract void setDurationTime(int minutes)
- Set duration time as a measure of minutes.
The implementation of this method is dependent upon the ReceiverThread.
If you set DurationTime for ServerThread, the generated ReceiverThread
will have the same duration time set to ServerThread.
- Parameters:
- minutes - Idle duration time in minutes
endConn
public abstract synchronized void endConn()
- Disconnect connection
All Packages Class Hierarchy This Package Previous Next Index