pt.digitalis.iss
Interface ISSRequestManagement

All Known Implementing Classes:
ISSImpl

public interface ISSRequestManagement

This interface provides operations related to request management between the ISS and the Worker. Through this interface a Worker can fetch request from the ISS as well as return the results and notify the ISS that it has finished it's work.

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt

Method Summary
 boolean areTooManyWorkers()
          Tests if the current number of workers is above the current limit
 ServiceRequest getWaitingRequest()
          Gets a request that is waiting for service.
 void notifyWorkerFinished()
          Callback method to notify ISS of Worker's execution end.
 void returnRequest(ServiceRequest returned)
          Callback method for the Workers to call when they finish.
 

Method Detail

getWaitingRequest

ServiceRequest getWaitingRequest()
Gets a request that is waiting for service.

Returns:
a queued request

returnRequest

void returnRequest(ServiceRequest returned)
Callback method for the Workers to call when they finish.

Parameters:
returned - the serviced request

areTooManyWorkers

boolean areTooManyWorkers()
Tests if the current number of workers is above the current limit

Returns:
true if there are more workers the allowed

notifyWorkerFinished

void notifyWorkerFinished()
Callback method to notify ISS of Worker's execution end.



Copyright © 2010 Digitalis Informática Lda. All Rights Reserved.