Examples of Scheduler


Examples of de.nava.informa.utils.toolkit.Scheduler

    // Initialize workers manager.
    workersManager = new WorkersManager(new CleanerThreadFactory(), workerThreads);

    // Initialize scheduler.
    scheduler = new Scheduler(new SchedulerCallback());
  }
View Full Code Here

Examples of it.sauronsoftware.cron4j.Scheduler

  public static void main(String[] args) {
    // Prepares the task.
    MyTask task = new MyTask();
    // Creates the scheduler.
    Scheduler scheduler = new Scheduler();
    // Schedules the task, once every minute.
    scheduler.schedule("* * * * *", task);
    // Starts the scheduler.
    scheduler.start();
    // Stays alive for five minutes.
    try {
      Thread.sleep(5L * 60L * 1000L);
    } catch (InterruptedException e) {
      ;
    }
    // Stops the scheduler.
    scheduler.stop();
  }
View Full Code Here

Examples of it.sauronsoftware.cron4j.Scheduler

  protected void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    // Retrieves the servlet context.
    ServletContext context = getServletContext();
    // Retrieves the scheduler.
    Scheduler scheduler = (Scheduler) context
        .getAttribute(Constants.SCHEDULER);
    // Retrieves the executors.
    TaskExecutor[] executors = scheduler.getExecutingTasks();
    // Registers the executors in the request.
    req.setAttribute("executors", executors);
    // Action requested?
    String action = req.getParameter("action");
    if ("pause".equals(action)) {
View Full Code Here

Examples of it.sauronsoftware.cron4j.Scheduler

    // Prepares the listener.
    MySchedulerListener listener = new MySchedulerListener();
    // Prepares the task.
    MyTask task = new MyTask();
    // Creates the scheduler.
    Scheduler scheduler = new Scheduler();
    // Registers the listener.
    scheduler.addSchedulerListener(listener);
    // Schedules the task, once every minute.
    scheduler.schedule("* * * * *", task);
    // Starts the scheduler.
    scheduler.start();
    // Stays alive for five minutes.
    try {
      Thread.sleep(5L * 60L * 1000L);
    } catch (InterruptedException e) {
      ;
    }
    // Stops the scheduler.
    scheduler.stop();
  }
View Full Code Here

Examples of it.sauronsoftware.cron4j.Scheduler

  public static void main(String[] args) {
    // Declares the file.
    File file = new File("cron4jtab.txt");
    // Creates the scheduler.
    Scheduler scheduler = new Scheduler();
    // Schedules the file.
    scheduler.scheduleFile(file);
    // Starts the scheduler.
    scheduler.start();
    // Stays alive for five minutes.
    try {
      Thread.sleep(5L * 60L * 1000L);
    } catch (InterruptedException e) {
      ;
    }
    // Stops the scheduler.
    scheduler.stop();
  }
View Full Code Here

Examples of it.sauronsoftware.cron4j.Scheduler

public class SchedulerServletContextListener implements ServletContextListener {

  public void contextInitialized(ServletContextEvent event) {
    ServletContext context = event.getServletContext();
    // 1. Creates the scheduler.
    Scheduler scheduler = new Scheduler();
    // 2. Registers a custom task collector.
    TaskCollector collector = new MyTaskCollector();
    scheduler.addTaskCollector(collector);
    // 3. Starts the scheduler.
    scheduler.start();
    // 4. Registers the scheduler.
    context.setAttribute(Constants.SCHEDULER, scheduler);
  }
View Full Code Here

Examples of it.sauronsoftware.cron4j.Scheduler

  }

  public void contextDestroyed(ServletContextEvent event) {
    ServletContext context = event.getServletContext();
    // 1. Retrieves the scheduler from the context.
    Scheduler scheduler = (Scheduler) context.getAttribute(Constants.SCHEDULER);
    // 2. Removes the scheduler from the context.
    context.removeAttribute(Constants.SCHEDULER);
    // 3. Stops the scheduler.
    scheduler.stop();
  }
View Full Code Here

Examples of kanakata.runtime.Scheduler

        // Logging configuration
        FileHandler handler = new FileHandler("%h/kanakata-%g.log", 1024000, 10, true);
        handler.setFormatter(new SimpleFormatter());
        Logger.getLogger("").addHandler(handler);
        // Application wiring
        Scheduler scheduler = new Scheduler(new Timer(true));
        KataFrame frame = new KataFrame(scheduler);
        KanaFlash flash = new KanaFlash(frame);
        flash.setInstructions(Resources.INSTRUCTIONS_FLASH);
        KanaTiles tiles = new KanaTiles(frame);
        tiles.setInstructions(Resources.INSTRUCTIONS_TILES);
View Full Code Here

Examples of kilim.Scheduler

     * The task contains an endpoint object, the bridge between the NIO system
     * and Kilim's scheduling.
     */
    public static class Server extends SessionTask {
        public static void run() throws IOException {
            Scheduler sessionScheduler = Scheduler.getDefaultScheduler(); // The scheduler/thread pool on which all tasks will be run
            NioSelectorScheduler nio = new NioSelectorScheduler(); // Starts a single thread that manages the select loop
            nio.listen(port, Server.class, sessionScheduler); //
        }
View Full Code Here

Examples of net.gridshield.nexsm.scheduler.Scheduler

        _listeners = new LinkedList<MapperListener>();
        _pushers = new ArrayList<ConfPusher>();
        _statusErrorsTypeDisplayed = new int[15];
        _codebase = null;
        _graphManager = new GraphManager();
        _getItemsScheduler = new Scheduler();
        _pullManager = new PullManager();
        _pushManager = new PushManager();
        _li = new LoggedInUser();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.