|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
dcf.server.Distributer
This is the RMI server. It handles sending tasks and recieving results.
It also starts the ClassServer to serve classfiles to clients.
| Constructor Summary | |
Distributer(MainFrame parent)
|
|
| Method Summary | |
void |
addMessage(dcf.server.String str)
Posts a message to parent (dcf.server.MainFrame) |
void |
addPair(Task t,
Solver s)
Adds a Task-Solver pair to the distributer |
dcf.server.HashMap |
getAssignments()
Gets the list of assignments |
dcf.server.String |
getClassServerURL()
|
ClassServer |
getCS()
|
ClientsUpdater |
getCU()
|
Task |
getNextTask(WorkerInt w)
|
Solver |
getSolverFor(Task t)
Returns a solver for the task based on the Task's name. |
Task |
getTaskByName(dcf.server.String name)
Gets a task by its name looks in unsolved tasks and then in solved tasks. |
dcf.server.Vector |
getTasks()
|
boolean |
hasMoreTasks()
Checks if there are more tasks in the list |
void |
registerClient(WorkerInt w,
Task tsk)
Registers a new client at the server |
void |
returnTask(WorkerInt w,
Task t)
Return a completed task to the distributer. |
void |
setTasksList()
Updates the Worker - Task table on GUI. |
void |
unregisterClient(WorkerInt w)
Unregisters a client at the server |
| Constructor Detail |
public Distributer(MainFrame parent)
throws dcf.client.RemoteException
| Method Detail |
public void addPair(Task t,
Solver s)
t - Task to adds - Solver for this taskpublic dcf.server.Vector getTasks()
public Task getTaskByName(dcf.server.String name)
name - - Task's name (String name field in the task)public ClassServer getCS()
public ClientsUpdater getCU()
public void addMessage(dcf.server.String str)
str - The message to add to GUI.
public void registerClient(WorkerInt w,
Task tsk)
w - The remote reference to the Worker.tsk - The Task assigned to the Worker.public void unregisterClient(WorkerInt w)
w - The remote reference to Worker.public dcf.server.HashMap getAssignments()
public void setTasksList()
public boolean hasMoreTasks()
throws dcf.client.RemoteException
hasMoreTasks in interface DistributerIntdcf.client.RemoteException - if some eror occures here.
public Task getNextTask(WorkerInt w)
throws dcf.client.RemoteException
getNextTask in interface DistributerIntw - The remote reference to the Worker.dcf.client.RemoteException - if we get some error here.
public Solver getSolverFor(Task t)
throws dcf.client.RemoteException
getSolverFor in interface DistributerIntt - The task to get the solver fordcf.client.RemoteException - If we get an error here.
public void returnTask(WorkerInt w,
Task t)
throws dcf.client.RemoteException
returnTask in interface DistributerIntw - The remote reference to the Worker.t - The task to return.dcf.client.RemoteException - If we get some kind of error here.
public dcf.server.String getClassServerURL()
throws dcf.client.RemoteException
getClassServerURL in interface DistributerIntdcf.client.RemoteException - If we get some kind of error here.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||