Class WorkerService.WorkRequest

  • Enclosing class:
    WorkerService

    public abstract static class WorkerService.WorkRequest
    extends Object
    Callers should implement a class extending WorkRequest in order to schedule work with the service.
    • Constructor Detail

      • WorkRequest

        public WorkRequest()
    • Method Detail

      • doWork

        public abstract void doWork()
                             throws Exception
        Must be implemented. Is called when the work request is run.
        Throws:
        Exception
      • cleanup

        public void cleanup()
        (Optional) If implemented, is called if the service is stopped or unable to schedule the request.