All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Abstract.Address

Abstract.Address

public class Address
Connection Address class. The Address class abstracts necessary information for connection. The core idea of the Address class is :


Constructor Index

 o Address()
Default Constructor
 o Address(String)
Constructor by reading one line in the Address file You can pass one line read from the Adress file which has the format
ID,Host,port,type,description
The 'description' field is optional.
 o Address(String, String, int, String, String)
Constructor given agent name, host, port , type and description.

Method Index

 o getDescription()
Get Agent Description
 o getHost()
Get Agent Host Name
 o getID()
Get Agent Name
 o getPort()
Get Agent Port
 o getType()
Get an agent type(class name)
 o setDescription(String)
Set description
 o setHost(String)
Set Agent Internet host name
 o setID(String)
Set Agent Name
 o setPort(int)
Set Agent Connection port
 o setType(String)
Set type
 o toString()
toString override.

Constructors

 o Address
 public Address()
Default Constructor

 o Address
 public Address(String id,
                String host,
                int port,
                String type,
                String description)
Constructor given agent name, host, port , type and description.

Parameters:
id - Name of the Agent
host - Internet address of the agent(IP address is not supported)
port - Port number
type - Normally message-method
description - String description of the Address. Within the description, comma(',') is not allowed.
 o Address
 public Address(String addrLine) throws ConnectionException
Constructor by reading one line in the Address file You can pass one line read from the Adress file which has the format
ID,Host,port,type,description
The 'description' field is optional.

Parameters:
addrLine - One line read from the Address file
Throws: ConnectionException
Occurs when the input parameter line is not well formated

Methods

 o setID
 public void setID(String id)
Set Agent Name

Parameters:
id - Agent Name
Returns:
None
 o setHost
 public void setHost(String host)
Set Agent Internet host name

Parameters:
host - Host name
Returns:
None
 o setPort
 public void setPort(int port)
Set Agent Connection port

Parameters:
port - Port number
Returns:
None
 o setType
 public void setType(String type)
Set type

Parameters:
type - Agent type
 o setDescription
 public void setDescription(String desc)
Set description

Parameters:
desc - Description
 o getID
 public String getID()
Get Agent Name

Returns:
_id
 o getHost
 public String getHost()
Get Agent Host Name

Returns:
_host
 o getPort
 public int getPort()
Get Agent Port

Returns:
_port
 o getType
 public String getType()
Get an agent type(class name)

Returns:
_type of the Address
 o getDescription
 public String getDescription()
Get Agent Description

Returns:
_description
 o toString
 public String toString()
toString override. Comma separated string will be returned

Returns:
"id,host,port,type,description"

All Packages  Class Hierarchy  This Package  Previous  Next  Index