LOGGER.debug("Forwarding file to client " + file);
int loc = NodeSelecter.select_get(file);
NodeInfo info = nodes.get(loc);
FileServerInterface node = info.getNode();
Socket sourceSocket = info.getSocket();
// Request file transfer
boolean response = false;
try {
response = node.getFile(file);
} catch (RemoteException e1) {
e1.printStackTrace();
return;
}
if (response)
LOGGER.debug("Received permission to put file ");
else {
LOGGER.info("Permission denied");
return;
}
// Get file size
long size;
try {
size = node.getFileSize(file);
} catch (RemoteException e1) {
e1.printStackTrace();
return;
}