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
-
_addresses
- AddressTable, which will be maintained by the Security
-
_passwordCheck
- Set true if password check will be performed.
-
_passwordFilePath
- Password file path.
-
Security()
- Default constructor.
-
Security(AddressTable)
- Constructor with AddressTable
-
Security(AddressTable, String)
- Constructor with AddressTable and password file path
-
getAddressTable()
- Get AddressTable from the Security object
-
getPasswordFilePath()
- Get password file path, assigned to the Security object
-
isValidAgent(Object)
- Check whether the given agent is valid to connect to the Server
-
processClientLogin(ReceiverThread, Address)
- Opposite to the processServerLogin.
-
processClientLogout(ReceiverThread)
- Send disconnect message to the server.
-
processServerLogin(ReceiverThread)
- Connection is requested from the client.
-
setAddressTable(AddressTable)
- Set address table to the Security object
-
setPasswordCheck(boolean)
- Set the password checking bit.
-
setPasswordFilePath(String)
- Set the password file path
_addresses
protected AddressTable _addresses
- AddressTable, which will be maintained by the Security
- See Also:
- AddressTable
_passwordFilePath
protected String _passwordFilePath
- Password file path.
_passwordCheck
protected boolean _passwordCheck
- Set true if password check will be performed. If true, it will perform password checking.
Security
public Security()
- Default constructor. By default, no password checking is assumed
Security
public Security(AddressTable addresses)
- Constructor with AddressTable
- Parameters:
- addresses - AddressTable to be maintained
Security
public Security(AddressTable addresses,
String passwordFilePath)
- Constructor with AddressTable and password file path
- Parameters:
- addresses - AddressTable to be maintained
- passwordFilePath - Password file path
getAddressTable
public AddressTable getAddressTable()
- Get AddressTable from the Security object
- Returns:
- AddressTable
getPasswordFilePath
public String getPasswordFilePath()
- Get password file path, assigned to the Security object
- Returns:
- Password file path
setAddressTable
public void setAddressTable(AddressTable addresses)
- Set address table to the Security object
- Parameters:
- addresses - AddressTable will be maintained by the Security object
setPasswordFilePath
public void setPasswordFilePath(String passwordFilePath)
- Set the password file path
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
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
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
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
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