Class EventsRestService
Object
EventsRestService
Takes care of all the events.
- Author:
- maartenl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResponse
events
(HttpServletRequest request) Runs every minute, looks up which user-defined event to execute now.Response
executeIdleCleanup
(HttpServletRequest request) Started once an hour, and computes who has been idle too long.protected EntityManager
Returns the entity manager of JPA.runSingleEvent
(Integer eventid, HttpServletRequest request)
-
Field Details
-
LOCALHOST
- See Also:
-
ONLY_LOCALHOST_MAY_ACCESS_THIS
- See Also:
-
-
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
-
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 javascriptInstantiationException
- an exception because of javascriptInvocationTargetException
- 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".
-