All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class BaseLayer.BSecurity

Abstract.Security
   |
   +----BaseLayer.BSecurity

public class BSecurity
extends Security
Simple implementation of Security class. The register, unregister process is very simple. When connection is request from other agent, and accept() is successful, the server thread will send 'Connected' message to the client. After the client received the 'Connected' message, the client will send its name to the server.


Constructor Index

 o BSecurity()
Default constructor
 o BSecurity(AddressTable)
Constructor with AddressTable
 o BSecurity(AddressTable, String)
Constructor with AddressTable and PasswordFilePath

Method Index

 o isValidAgent(Object)
No checking on the validity
 o processClientLogin(ReceiverThread, Address)
Implementation of processClientLogin method of Security class Opposite to the processServerLogin.
 o processClientLogout(ReceiverThread)
Send disconnect message to the server.
 o processServerLogin(ReceiverThread)
Connection is requested from the client.

Constructors

 o BSecurity
 public BSecurity()
Default constructor

 o BSecurity
 public BSecurity(AddressTable addresses)
Constructor with AddressTable

Parameters:
addresses - AddressTable will be maintained by this security
 o BSecurity
 public BSecurity(AddressTable addresses,
                  String passwordFilePath)
Constructor with AddressTable and PasswordFilePath

Parameters:
addresses - AddressTable will be maintained by this security
passwordFilePath - If you want password ckeck, you can specify its path

Methods

 o processServerLogin
 public void processServerLogin(ReceiverThread c)
Connection is requested from the client. Server will send 'Connected' message and wait client id. This will be override if new register protocol is added.

Parameters:
c - TCPRecvThread will be started
Overrides:
processServerLogin in class Security
 o processClientLogin
 public void processClientLogin(ReceiverThread c,
                                Address serveraddress) throws ConnectionException
Implementation of processClientLogin method of Security class Opposite to the processServerLogin. Connection should be added to the connection table, by caller.

Parameters:
c - BRecvThread, which will connect to the other server
serveraddress - Address of the Server
Overrides:
processClientLogin in class Security
 o processClientLogout
 public void processClientLogout(ReceiverThread c)
Send disconnect message to the server. The TCPRecvThread is initiated by me.

Parameters:
c - BRecvThread, which will stop.
Overrides:
processClientLogout in class Security
 o isValidAgent
 public boolean isValidAgent(Object o)
No checking on the validity

Overrides:
isValidAgent in class Security

All Packages  Class Hierarchy  This Package  Previous  Next  Index