Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Created July 12, 2015 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/0ce662313809dccb6cde to your computer and use it in GitHub Desktop.
Save abhirockzz/0ce662313809dccb6cde to your computer and use it in GitHub Desktop.
@POST
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response schedule(@HeaderParam("name") final String timerName, final ScheduleConfiguration config) {
auditScheduler.schedule(from(config), new TimerConfig(timerName, config.isPersistent()));
return Response.created(UriBuilder.fromResource(AuditSchedulerResource.class).path(timerName).build(timerName)).build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment