Package it.sauronsoftware.cron4j

Examples of it.sauronsoftware.cron4j.TaskExecutor$Runner


        try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
        Method[] methods = getClass().getDeclaredMethods();
        Method m=null;
        for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
        final Method method=m;
        return new Runner() {
            private static final long serialVersionUID = 0;
            public void run() {
                try {
                    method.setAccessible(true);
                    method.invoke(SimpleGUI.this, new Object[]{});
View Full Code Here


        try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
        Method[] methods = getClass().getDeclaredMethods();
        Method m=null;
        for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
        final Method method=m;
        return new Runner() {
            private static final long serialVersionUID = 0;
            public void run(Object arg) {
                try {
                    method.setAccessible(true);
                    method.invoke(SimpleGUI.this, new Object[]{arg});
View Full Code Here

      try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
      Method[] methods = getClass().getDeclaredMethods();
      Method m=null;
      for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
      final Method method=m;
      return new Runner() {
         private static final long serialVersionUID = 0;
         public void run() {
            try {
               method.setAccessible(true);
               method.invoke(VizGUI.this, new Object[]{});
View Full Code Here

      try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
      Method[] methods = getClass().getDeclaredMethods();
      Method m=null;
      for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
      final Method method=m;
      return new Runner() {
         private static final long serialVersionUID = 0;
         public void run(Object arg) {
            try {
               method.setAccessible(true);
               method.invoke(VizGUI.this, new Object[]{arg});
View Full Code Here

    req.setAttribute("executors", executors);
    // Action requested?
    String action = req.getParameter("action");
    if ("pause".equals(action)) {
      String id = req.getParameter("id");
      TaskExecutor executor = find(executors, id);
      if (executor != null && executor.isAlive() && !executor.isStopped()
          && executor.canBePaused() && !executor.isPaused()) {
        executor.pause();
      }
    } else if ("resume".equals(action)) {
      String id = req.getParameter("id");
      TaskExecutor executor = find(executors, id);
      if (executor != null && executor.isAlive() && !executor.isStopped()
          && executor.canBePaused() && executor.isPaused()) {
        executor.resume();
      }
    } else if ("stop".equals(action)) {
      String id = req.getParameter("id");
      TaskExecutor executor = find(executors, id);
      if (executor != null && executor.isAlive()
          && executor.canBeStopped() && !executor.isStopped()) {
        executor.stop();
      }
    }
    // Layout.
    String page = "/WEB-INF/ongoing.jsp";
    RequestDispatcher dispatcher = req.getRequestDispatcher(page);
View Full Code Here

TOP

Related Classes of it.sauronsoftware.cron4j.TaskExecutor$Runner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.