All Packages Class Hierarchy This Package Previous Next Index
Class semper.dispatcher.BargainerWorker
java.lang.Object
|
+----java.lang.Thread
|
+----semper.dispatcher.BargainerWorker
- public class BargainerWorker
- extends Thread
- implements BargainerTaskControl
This class is responsible for the setup of tx-connection between client
and server bargainers
- Author:
- Kostas Tzelepis, Petros Pantis
-
BargainerWorker(int, BargainerMonitor)
- starts a new BargainerWorker, this is called at run time
by the Monitor object when it feels more BargainerWorkers
are needed to handle the load.
-
Handler(Object)
- Called from the Monitor object in order to associate a
new client connection,or to create a new one,
with a idle BargainerWorker object
-
run()
- This method retrieves the requested BApp and associate this BA with
a new created tx-connection in case of a server BApp.
-
SetPriority(int)
- Method used to set the priority level of the current thread object
-
Stop()
- Called from the Monitor object in order to destroys the BargainerWorker object
BargainerWorker
public BargainerWorker(int id,
BargainerMonitor dismnt)
- starts a new BargainerWorker, this is called at run time
by the Monitor object when it feels more BargainerWorkers
are needed to handle the load.
- Parameters:
- id - the Id of the BargainerWorker object
- dismnt - a reference to the Monitor object
Stop
public void Stop()
- Called from the Monitor object in order to destroys the BargainerWorker object
Handler
public synchronized void Handler(Object conn)
- Called from the Monitor object in order to associate a
new client connection,or to create a new one,
with a idle BargainerWorker object
- Parameters:
- conn - the new task description object
run
public void run()
- This method retrieves the requested BApp and associate this BA with
a new created tx-connection in case of a server BApp. In case of a
client BApp this method created the appropriated BApp object and starts
them.
- Overrides:
- run in class Thread
SetPriority
public void SetPriority(int prio)
- Method used to set the priority level of the current thread object
- Parameters:
- prio - the new priority level
All Packages Class Hierarchy This Package Previous Next Index