@Path("process/{id}") @Produces(SseFeature.SERVER_SENT_EVENTS) @GET public EventOutput getProgress( @PathParam("id") int id, @DefaultValue("false") @QueryParam("testSource") boolean testSource) { final Process process = processes.get(id); if (process != null) { if (testSource) { process.release(); } final EventOutput eventOutput = new EventOutput(); process.getBroadcaster().add(eventOutput); return eventOutput; } else { throw new NotFoundException(); } }