class TimerResource implements Resource {

	@GET
	@Path("timers/{pathid}")
	@Produces(MediaType.APPLICATION_JSON)
	public Timer getTimer(@PathParam("pathid") int timerNumber) {
		Timer timer;
		try {
			timer = this.logic.getTimer(timerNumber);
		} catch (NoSuchElementException e) {
			throw new WebApplicationException("there is no timer" + timerNumber, e, Status.NOT_FOUND);
		}
		timer.setLink(createTimerPath(timerNumber));
		return timer;
	}

}