Package com.caucho.config.timer

Examples of com.caucho.config.timer.EjbTimer


  {
    Collection<Timer> timers = new LinkedList<Timer>();

    synchronized (_timers) {
      for (TimerTask task : _timers) {
        timers.add(new EjbTimer(task));
      }
    }

    return timers;
  }
View Full Code Here


   *          expiration. This can be null.
   * @return The newly created Timer.
   */
  private Timer createTimer(Trigger trigger, Serializable info)
  {
    EjbTimer timer = new EjbTimer();
    TimerTask scheduledTask
      = new TimerTask(_timeout, timer, null, trigger, info);
    timer.setScheduledTask(scheduledTask);

    synchronized (_timers) {
      _timers.add(scheduledTask);
    }

View Full Code Here

   */
  private Timer createRepeatingTimer(Date expiration, long interval,
      Serializable info)
  {
    Trigger trigger = new TimerTrigger(expiration.getTime(), interval);
    EjbTimer timer = new EjbTimer();

    TimerTask scheduledTask = new TimerTask(_timeout, timer, null, trigger,
        info);
    timer.setScheduledTask(scheduledTask);

    synchronized (_timers) {
      _timers.add(scheduledTask);
    }

View Full Code Here

    if (schedule.getEnd() != null) {
      end = schedule.getEnd().getTime();
    }

    Trigger trigger = new CronTrigger(cronExpression, start, end, timezone);
    EjbTimer timer = new EjbTimer();
    TimerTask scheduledTask = new TimerTask(_timeout, timer, cronExpression,
        trigger, info);
    timer.setScheduledTask(scheduledTask);

    synchronized (_timers) {
      _timers.add(scheduledTask);
    }
View Full Code Here

  {
    Collection<Timer> timers = new LinkedList<Timer>();

    synchronized (_timers) {
      for (TimerTask task : _timers) {
        timers.add(new EjbTimer(task));
      }
    }

    return timers;
  }
View Full Code Here

   *          expiration. This can be null.
   * @return The newly created Timer.
   */
  private Timer createTimer(Trigger trigger, Serializable info)
  {
    EjbTimer timer = new EjbTimer();
    TimerTask scheduledTask = new TimerTask(_timeout, timer, null, trigger,
        info);
    timer.setScheduledTask(scheduledTask);

    synchronized (_timers) {
      _timers.add(scheduledTask);
    }

View Full Code Here

   */
  private Timer createRepeatingTimer(Date expiration, long interval,
      Serializable info)
  {
    Trigger trigger = new TimerTrigger(expiration.getTime(), interval);
    EjbTimer timer = new EjbTimer();

    TimerTask scheduledTask = new TimerTask(_timeout, timer, null, trigger,
        info);
    timer.setScheduledTask(scheduledTask);

    synchronized (_timers) {
      _timers.add(scheduledTask);
    }

View Full Code Here

    if (schedule.getEnd() != null) {
      end = schedule.getEnd().getTime();
    }

    Trigger trigger = new CronTrigger(cronExpression, start, end, timezone);
    EjbTimer timer = new EjbTimer();
    TimerTask scheduledTask = new TimerTask(_timeout, timer, cronExpression,
        trigger, info);
    timer.setScheduledTask(scheduledTask);

    synchronized (_timers) {
      _timers.add(scheduledTask);
    }
View Full Code Here

TOP

Related Classes of com.caucho.config.timer.EjbTimer

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.