EventTimerTask (Mule ESB 2.2.1 API)
Keywords: org.mule.util.timer.EventTimerTask class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.util.timer
Class EventTimerTask

    java.lang.Object
      java.util.TimerTask
          org.mule.util.timer.EventTimerTask

All Implemented Interfaces:
  Runnable

    public class EventTimerTask

extends 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.

Constructor Summary
`EventTimerTask(TimeEventListener listener)` Constructs a EventTimeTask and registers a listener with it
`EventTimerTask(TimeEventListener listener, String name)` Constructs a EventTimeTask and registers a listener with it

Method Summary
`void` | `addListener(TimeEventListener listener)`
`protected void` | `fireTimerEvent(TimeEvent event)`
`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`

Constructor Detail

### EventTimerTask

    public EventTimerTask(TimeEventListener listener)

  Constructs a EventTimeTask and registers a listener with it

  Parameters:
    `listener` - the listener to register

### EventTimerTask

    public EventTimerTask(TimeEventListener listener,
                          String name)

  Constructs a EventTimeTask and registers a listener with it

  Parameters:
    `listener` - the listener to register
    `name` - the name for the task

Method Detail

### run

    public void run()

  The action to be performed by this timer task. The fireTime event method is called.

  Specified by:
    `run` in interface `Runnable`
  Specified by:
    `run` in class `TimerTask`

### getName

    public String getName()

  Gets the task name (this is also the timer thread name)

  Returns:
    the task 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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.