// go through each action, and decider whether to grant or deny
// access, or if necessary, schedule for later
for (Action action : set.values()) {
// query the resource about this permission, and handle the
// result
switch (resource.request(id.getIdentity(), action)) {
case GRANT:
// access is granted, add to the response list
grantSet.put(action.getName(), action);
break;
case DENY: