Skip to content

Commit

Permalink
Adding reload trigger rest endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasponce committed Mar 17, 2015
1 parent 59c24ea commit 5a68e14
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import javax.ejb.EJB;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.container.AsyncResponse;
import javax.ws.rs.container.Suspended;
Expand Down Expand Up @@ -82,4 +83,14 @@ public void reloadAlerts(@Suspended final AsyncResponse response) {
alerts.reload();
response.resume(Response.status(Response.Status.OK).build());
}

@GET
@Path("/reload/{triggerId}")
@ApiOperation(value = "Reload a specific trigger into the alerts service",
responseClass = "void")
public void reloadTrigger(@Suspended final AsyncResponse response,
@PathParam("triggerId") String triggerId) {
alerts.reloadTrigger(triggerId);
response.resume(Response.status(Response.Status.OK).build());
}
}

0 comments on commit 5a68e14

Please sign in to comment.