Class EventsRestService

Object
EventsRestService

@Path("/crontab/events") public class EventsRestService extends Object
Takes care of all the events.
Author:
maartenl

umldiagram

  • Field Details

  • Constructor Details

    • EventsRestService

      public EventsRestService()
  • Method Details

    • getEntityManager

      protected EntityManager getEntityManager()
      Returns the entity manager of JPA. This is defined in build/web/WEB-INF/classes/META-INF/persistence.xml.
      Returns:
      EntityManager
    • runSingleEvent

      @GET @Path("{eventid}") public String runSingleEvent(@PathParam("eventid") Integer eventid, @Context HttpServletRequest request)
    • events

      @GET public Response events(@Context HttpServletRequest request) throws IllegalAccessException, InstantiationException, InvocationTargetException
      Runs every minute, looks up which user-defined event to execute now. So, this takes care of the events that have been dictated by the deputies.
      Returns:
      always "400"
      Throws:
      IllegalAccessException - an exception because of javascript
      InstantiationException - an exception because of javascript
      InvocationTargetException - an exception because of javascript
    • executeIdleCleanup

      @GET @Path("idles") public Response executeIdleCleanup(@Context HttpServletRequest request)
      Started once an hour, and computes who has been idle too long.
      Returns:
      always "400".