Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Pyx4j framework
  * Copyright (C) 2006 pyx4.com.
  *
  * @author vlads
  * @version $Id: ScheduledTask.java 1 2007-03-09 04:03:48Z vlads $
  */
 package com.pyx4j.utils;
 
Simple to use facility for threads to schedule tasks for future execution in a background thread. Created on 1-Jun-2006 Contributing Author(s): Vlad Skarzhevskyy <vlad at unilore.com> (Inital implementation)

Author(s):
vlads
Version:
$Revision: 1 $ ($Author: vlads $) $Date: 2007-03-08 23:03:48 -0500 (Thu, 08 Mar 2007) $
public abstract class ScheduledTask extends TimerTask {
    
    private Timer timer
    
    
Schedules the task for execution after the specified delay.

Parameters:
time - delay in milliseconds before task is to be executed.
    public ScheduledTask(long dellay) {
        this. = new Timer();
        this..schedule(thisdellay);
    }
    
    
Schedules the task for execution at the specified time.

Parameters:
time - time at which task is to be executed.
    public ScheduledTask(Date time) {
        this. = new Timer();
        this..schedule(thistime);
    }
    
    

Returns:
Returns the timer.
    public Timer getTimer() {
        return this.;
    }
New to GrepCode? Check out our FAQ X