@@ -0,0 +1,1283 @@
+package webserver;%0A%0Aimport converters.JsonConverter;%0Aimport datamodel.Job;%0Aimport datamodel.Request;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.web.bind.annotation.RequestBody;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0Aimport org.springframework.web.bind.annotation.RestController;%0Aimport rabbit.Sender;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0A%0A@RestController%0Apublic class RequestController %7B%0A%0A    @RequestMapping(value = %22/request%22, method = RequestMethod.POST)%0A    public ResponseEntity%3CJob%3E jobRequest(@RequestBody String requestBody, HttpServletRequest httpRequest) %7B%0A        Request request = JsonConverter.jsonStringToObject(requestBody, Request.class);%0A%0A        if ((request.getClientId() != null) && (request.getCommand() != null)) %7B%0A            Sender sender = new Sender();%0A            String jobId = sender.send(request, httpRequest.getRemoteAddr());%0A            sender.closeConnection();%0A            return new ResponseEntity%3CJob%3E(new Job(jobId), HttpStatus.ACCEPTED);%0A        %7D%0A        else %7B%0A            return new ResponseEntity%3CJob%3E(new Job(%22-1%22), HttpStatus.BAD_REQUEST);%0A        %7D%0A        %0A    %7D%0A%7D%0A

Add controller for REST calls.