// Free reading right has been removed, reject the non readers requests.
for (int i = 0; i < requests.size(); i++) {
request = (ReceiveRequest) requests.get(i);
if (! isReader(request.requester)) {
forward(request.requester,
new ExceptionReply(request, new AccessException("Free READ access removed")));
setSave(); // state change, so save.
requests.remove(i);
i--;
}
}
} else {
// Reading right of a given user has been removed; replying to its requests.
for (int i = 0; i < requests.size(); i++) {
request = (ReceiveRequest) requests.get(i);
if (user.equals(request.requester)) {
forward(request.requester,
new ExceptionReply(request, new AccessException("READ right removed")));
setSave(); // state change, so save.
requests.remove(i);
i--;
}
}