All Packages Class Hierarchy This Package Previous Next Index
Class RouterLayer.Router.RegistrarRecvThread
Abstract.Connection
|
+----Abstract.ReceiverThread
|
+----BaseLayer.BRecvThread
|
+----RouterLayer.Router.RegistrarRecvThread
- public class RegistrarRecvThread
- extends BRecvThread
Lightweight ReceiverThread, which is used only for the Router registration.
After security check, it will stop. You can set timer by invoking setDurationTime(int minutes)
method.
- See Also:
- ReceiverThread, ConnectionTable, TimerThread
-
RegistrarRecvThread()
- Default Constructor.
-
RegistrarRecvThread(Address, int, Address, ConnectionTable, MessageBuffer, Security, ThreadGroup)
- This constructor is called when an agent want to initialize a connection
to the Router Registrar, using Address.
-
RegistrarRecvThread(Socket, int, Address, ConnectionTable, MessageBuffer, Security)
- Constructor.
-
RegistrarRecvThread(String)
- Conctructor with the Agent name
-
endConn()
- Close the connection.
-
run()
- Override Thread run() method.
RegistrarRecvThread
public RegistrarRecvThread()
- Default Constructor.
RegistrarRecvThread
public RegistrarRecvThread(String name)
- Conctructor with the Agent name
- Parameters:
- name - Agent name
RegistrarRecvThread
public RegistrarRecvThread(Socket client_socket,
int priority,
Address address,
ConnectionTable connections,
MessageBuffer queue,
Security security) throws ConnectionException
- Constructor.
This constructor will be invoked by RegistrarServerThread
- Parameters:
- client_scoket - The socket for the remote client;
- priority - The priority of the thread.
- address - Registrar address
- connections - the connection table is passed as an argument.
- queue - the Message Queue. Normally null
- security - RegistrarSecurity
RegistrarRecvThread
public RegistrarRecvThread(Address serveraddress,
int priority,
Address myaddress,
ConnectionTable connections,
MessageBuffer queue,
Security security,
ThreadGroup tg) throws ConnectionException
- This constructor is called when an agent want to initialize a connection
to the Router Registrar, using Address.
- Parameters:
- serveraddress - The address of the Router Registrar.
- priority - The priority of the thread.
- myaddress - My addres
- connections - the connection table is passed as an argument.
- queue - the Message Queue. Normally, null
- security - The RouerSecurity object
run
public void run()
- Override Thread run() method. Only check the RouterSecurity and stop()
Timer will be set to the limited time. Use setDuariionTime(int minutes) to set
the time limit. If the time is elasped over the setting time, the Timer object
will automatically kill this thread
- Overrides:
- run in class BRecvThread
endConn
public synchronized void endConn()
- Close the connection. Close socket,input stream and output stream
- Overrides:
- endConn in class BRecvThread
All Packages Class Hierarchy This Package Previous Next Index