Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mule.util.timer
Class EventTimerTask  view EventTimerTask download EventTimerTask.java

java.lang.Object
  extended byjava.util.TimerTask
      extended byorg.mule.util.timer.EventTimerTask
All Implemented Interfaces:
java.lang.Runnable

public class EventTimerTask
extends java.util.TimerTask

EventTimerTask is a task that causes TimeEvent to be fired to listening objects when a specific number of milliseconds have passed. This implementation is based on the java.util.TimerTask.

Version:
$Revision: 1.5 $

Field Summary
private  java.util.List listeners
          A list of listeners on this task
private  java.lang.String name
          The name of the task
private  boolean started
          Determines if the task has been started
 
Fields inherited from class java.util.TimerTask
 
Constructor Summary
EventTimerTask(TimeEventListener listener)
          Constructs a EventTimeTask and registers a listener with it
EventTimerTask(TimeEventListener listener, java.lang.String name)
          Constructs a EventTimeTask and registers a listener with it
 
Method Summary
 void addListener(TimeEventListener listener)
           
protected  void fireTimerEvent(TimeEvent event)
           
 java.lang.String getName()
          Gets the task name (this is also the timer thread name)
 boolean isStarted()
           
 void removeAllListeners()
           
 void removeListener(TimeEventListener listener)
           
 void run()
          The action to be performed by this timer task.
 void start()
           
 void stop()
           
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

private java.util.List listeners
A list of listeners on this task


name

private java.lang.String name
The name of the task


started

private boolean started
Determines if the task has been started

Constructor Detail

EventTimerTask

public EventTimerTask(TimeEventListener listener)
Constructs a EventTimeTask and registers a listener with it


EventTimerTask

public EventTimerTask(TimeEventListener listener,
                      java.lang.String name)
Constructs a EventTimeTask and registers a listener with it

Method Detail

run

public void run()
The action to be performed by this timer task. The fireTime event method is called.


getName

public java.lang.String getName()
Gets the task name (this is also the timer thread name)


removeListener

public void removeListener(TimeEventListener listener)

removeAllListeners

public void removeAllListeners()

addListener

public void addListener(TimeEventListener listener)

fireTimerEvent

protected void fireTimerEvent(TimeEvent event)

stop

public void stop()

start

public void start()

isStarted

public boolean isStarted()