@GET @Path("reload") public Response reload() throws Exception { service.reload(new HttpSource(request)); return Response.status(Status.OK).build(); }
@GET @Path("start") public Response start() throws Exception { if (!service.isRunning()) service.start(new HttpSource(request)); return Response.status(Status.OK).build(); }
@GET @Path("stop") public Response stop() { if (service.isRunning()) service.stop(new HttpSource(request)); return Response.status(Status.OK).build(); }
@GET @Path("running") public String isRunning() { return String.valueOf(service.isRunning()); }