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

Variable Index

 o _connections
ConnectionTable, which contains the running receiver thread information
 o _durationTime
Maximum idle time.
 o _endWith
endWith character, may be dependent upon the implementation
 o _myaddress
Address which represent my(agent) address
 o _security
Data member to manage register and connection

Constructor Index

 o Connection()
Default Constructor
 o Connection(String)
Set Connection name(which is identical to the agent name)
 o Connection(ThreadGroup, String)
Constructor with thread group

Method Index

 o endConn()
Disconnect connection
 o getAddress()
Get Connection address
 o getConnectionTable()
Get ConnectionTable
 o getEndWith()
Accessor to get endWith character
 o getSecurity()
Get Security object
 o setAddress(Address)
Set my address
 o setConnectionTable(ConnectionTable)
Set ConnectionTable for Connection object
 o setDurationTime(int)
Set duration time as a measure of minutes.
 o setEndWith(char)
Set EndWith character.
 o setSecurity(Security)
Set Security object

Variables

 o _connections
 protected ConnectionTable _connections
ConnectionTable, which contains the running receiver thread information

See Also:
ConnectionTable
 o _myaddress
 protected Address _myaddress
Address which represent my(agent) address

See Also:
Address
 o _security
 protected Security _security
Data member to manage register and connection

See Also:
Security
 o _endWith
 protected char _endWith
endWith character, may be dependent upon the implementation

 o _durationTime
 protected int _durationTime
Maximum idle time. Default is no setting. You can set duration time using setDurationTime(long). Unit is minute.

Constructors

 o Connection
 public Connection()
Default Constructor

 o Connection
 public Connection(String name)
Set Connection name(which is identical to the agent name)

 o Connection
 public Connection(ThreadGroup g,
                   String name)
Constructor with thread group

Methods

 o 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
 o getEndWith
 public char getEndWith()
Accessor to get endWith character

 o setAddress
 public void setAddress(Address myaddress)
Set my address

Parameters:
myaddress - My address object
 o getAddress
 public Address getAddress()
Get Connection address

Returns:
My address
 o setConnectionTable
 public void setConnectionTable(ConnectionTable ctable)
Set ConnectionTable for Connection object

Parameters:
ctable - ConnectionTable
 o getConnectionTable
 public ConnectionTable getConnectionTable()
Get ConnectionTable

Returns:
Connection's ConnectionTable
 o setSecurity
 public synchronized void setSecurity(Security security) throws ConnectionException
Set Security object

Parameters:
security - Security object
 o getSecurity
 public Security getSecurity()
Get Security object

Returns:
Security object, the connection object are using
 o 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
 o endConn
 public abstract synchronized void endConn()
Disconnect connection


All Packages  Class Hierarchy  This Package  Previous  Next  Index