|
|
|
@ -84,7 +84,7 @@ public class ServerManagementUDP implements Runnable {
|
|
|
|
|
Payload p = pd.getPayload();
|
|
|
|
|
switch (p.getRequestResponseCode()) {
|
|
|
|
|
case LOAD_REQUEST:
|
|
|
|
|
loadRequestManagement(p, pd);
|
|
|
|
|
loadRequestManagement(pd);
|
|
|
|
|
break;
|
|
|
|
|
case LIST_REQUEST:
|
|
|
|
|
listRequestManagement(pd);
|
|
|
|
@ -158,7 +158,11 @@ public class ServerManagementUDP implements Runnable {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void loadRequestManagement(Payload p, ProtocolP2PPacketUDP pd){
|
|
|
|
|
/** Respond to LOAD requests
|
|
|
|
|
* @param pd ProtocolP2PPacketUDP
|
|
|
|
|
*/
|
|
|
|
|
public void loadRequestManagement(ProtocolP2PPacketUDP pd){
|
|
|
|
|
Payload p = pd.getPayload();
|
|
|
|
|
logger.writeUDP("Received LOAD_REQUEST", LogLevel.Action);
|
|
|
|
|
assert p instanceof LoadRequest : "payload must be an instance of LoadRequest";
|
|
|
|
|
if (!(p instanceof LoadRequest)) {
|
|
|
|
@ -208,6 +212,9 @@ public class ServerManagementUDP implements Runnable {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Respond to LIST requests
|
|
|
|
|
* @param pd ProtocolP2PPacketUDP
|
|
|
|
|
*/
|
|
|
|
|
public void listRequestManagement(ProtocolP2PPacketUDP pd) {
|
|
|
|
|
logger.writeUDP("Received LIST_REQUEST", LogLevel.Action);
|
|
|
|
|
try {
|
|
|
|
|