All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Abstract.Security

Abstract.Security

public abstract class Security
Security class to check the connection protocol and update AddressTable, ConnectionTable. For any connection, there should be an assumed connection protocol between two sides. The Security will implement the connection protocol. If the protocol is satisfied, the Security will add the connection to the connection.

See Also:
BSecurity, KQMLSecurity, RouterSecurity

Variable Index

 o _addresses
AddressTable, which will be maintained by the Security
 o _passwordCheck
Set true if password check will be performed.
 o _passwordFilePath
Password file path.

Constructor Index

 o Security()
Default constructor.
 o Security(AddressTable)
Constructor with AddressTable
 o Security(AddressTable, String)
Constructor with AddressTable and password file path

Method Index

 o getAddressTable()
Get AddressTable from the Security object
 o getPasswordFilePath()
Get password file path, assigned to the Security object
 o isValidAgent(Object)
Check whether the given agent is valid to connect to the Server
 o processClientLogin(ReceiverThread, Address)
Opposite to the processServerLogin.
 o processClientLogout(ReceiverThread)
Send disconnect message to the server.
 o processServerLogin(ReceiverThread)
Connection is requested from the client.
 o setAddressTable(AddressTable)
Set address table to the Security object
 o setPasswordCheck(boolean)
Set the password checking bit.
 o setPasswordFilePath(String)
Set the password file path

Variables

 o _addresses
 protected AddressTable _addresses
AddressTable, which will be maintained by the Security

See Also:
AddressTable
 o _passwordFilePath
 protected String _passwordFilePath
Password file path.

 o _passwordCheck
 protected boolean _passwordCheck
Set true if password check will be performed. If true, it will perform password checking.

Constructors

 o Security
 public Security()
Default constructor. By default, no password checking is assumed

 o Security
 public Security(AddressTable addresses)
Constructor with AddressTable

Parameters:
addresses - AddressTable to be maintained
 o Security
 public Security(AddressTable addresses,
                 String passwordFilePath)
Constructor with AddressTable and password file path

Parameters:
addresses - AddressTable to be maintained
passwordFilePath - Password file path

Methods

 o getAddressTable
 public AddressTable getAddressTable()
Get AddressTable from the Security object

Returns:
AddressTable
 o getPasswordFilePath
 public String getPasswordFilePath()
Get password file path, assigned to the Security object

Returns:
Password file path
 o setAddressTable
 public void setAddressTable(AddressTable addresses)
Set address table to the Security object

Parameters:
addresses - AddressTable will be maintained by the Security object
 o setPasswordFilePath
 public void setPasswordFilePath(String passwordFilePath)
Set the password file path

 o setPasswordCheck
 public void setPasswordCheck(boolean value)
Set the password checking bit. If true, password checking will be performed

Parameters:
value - Boolean value to set password checking
 o processServerLogin
 public abstract void processServerLogin(ReceiverThread c)
Connection is requested from the client. This will be override if new register protocol is added.

Parameters:
c - ReceiverThread will be started
 o processClientLogin
 public abstract void processClientLogin(ReceiverThread c,
                                         Address serveraddress) throws ConnectionException
Opposite to the processServerLogin. Connection should be added to the connection table, by caller.

Parameters:
c - ReceiverThread, which will connect to the other server
serveraddress - Other agent address where I want to connect
 o processClientLogout
 public abstract void processClientLogout(ReceiverThread c)
Send disconnect message to the server. The ReceiverThread is initiated by me.

Parameters:
c - ReceiverThread, which will stop.
myid - My name, may be passed to the server to disconnect gracefully
 o isValidAgent
 public abstract boolean isValidAgent(Object o)
Check whether the given agent is valid to connect to the Server

Parameters:
obj - Object which dependent upon the security implementation
Returns:
true if the agent is valid else, retur false

All Packages  Class Hierarchy  This Package  Previous  Next  Index