Server builds
This commit is contained in:
parent
d6e73cf7ad
commit
e476438c8c
1 changed files with 5 additions and 6 deletions
|
|
@ -16,12 +16,12 @@ public class JobServServer {
|
|||
private void start() throws IOException {
|
||||
// TODO: this should be passed in from a configuration manager
|
||||
int port = 8448;
|
||||
server = ServerBUilder.forPort(port)
|
||||
.addService(new JobServImpl())
|
||||
server = ServerBuilder.forPort(port)
|
||||
.addService(new ShellServerImpl())
|
||||
.build()
|
||||
.start();
|
||||
logger.info("Server initialized without tls");
|
||||
Runtime.getRuntime().addShutdownHook(new thread() {
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
// JVM shutdown might break logger functionality
|
||||
|
|
@ -53,7 +53,7 @@ public class JobServServer {
|
|||
}
|
||||
|
||||
// wrap around stub code generated by GRPC
|
||||
static class JobServImpl extends JobServ.JobServImplBase {
|
||||
static class ShellServerImpl extends ShellServerGrpc.ShellServerImplBase {
|
||||
|
||||
@Override
|
||||
public void getStatusDetail(RequestMessage request,
|
||||
|
|
@ -72,7 +72,6 @@ public class JobServServer {
|
|||
StreamObserver<OutputMessage> responder) {
|
||||
// TODO: Implement job controller, get output, do the thing
|
||||
OutputMessage reply = OutputMessage.newBuilder()
|
||||
.setPID(-1)
|
||||
.build();
|
||||
responder.onNext(reply);
|
||||
responder.onCompleted();
|
||||
|
|
@ -84,7 +83,7 @@ public class JobServServer {
|
|||
// TODO: Implement job controller, Start Job, do the thing
|
||||
JobStatusMessage reply = JobStatusMessage.newBuilder()
|
||||
.setPID(-1)
|
||||
.setJobStatus(-1)
|
||||
.setProcessStatus(-1)
|
||||
.build();
|
||||
responder.onNext(reply);
|
||||
responder.onCompleted();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue