finished refactoring client for additions to protocol
This commit is contained in:
parent
11d8516417
commit
9eb18219cb
2 changed files with 19 additions and 5 deletions
|
|
@ -94,8 +94,25 @@ public class JobServClient {
|
|||
}
|
||||
|
||||
int newProcess = this.api.sendNewJobMessage(command);
|
||||
// TODO: switch here for negative returns
|
||||
switch(newProcess) {
|
||||
case -1:
|
||||
System.out.println(this.serversideTimeoutErrorMessage);
|
||||
break;
|
||||
|
||||
case -2:
|
||||
System.out.println("Server failed to create job, check server logs.");
|
||||
break;
|
||||
|
||||
case -3:
|
||||
// error logged by API Connector
|
||||
break;
|
||||
|
||||
default:
|
||||
System.out.printf("Process started, assigned pid is %d\n", newProcess);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ package JobServ;
|
|||
|
||||
import io.grpc.ManagedChannel;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
import java.io.File;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
|
@ -23,8 +22,6 @@ import java.util.logging.Logger;
|
|||
* and to allow for a veriety of interfaces to be created
|
||||
*/
|
||||
class JobServClientAPIConnector {
|
||||
private final String serversideTimeoutErrorMessage = "Timeout locking process control on server\n"+
|
||||
"Server could be under heavy load\nConsider trying again.";
|
||||
private final String apiFailureMessage = "Failed while trying to connect to server.";
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue