## mx4j.timer
Class TimerTask

    java.lang.Object
      mx4j.timer.TimeTask
          mx4j.timer.TimerTask

All Implemented Interfaces:
  java.lang.Comparable, java.lang.Runnable

public abstract class TimerTask
extends TimeTask

A subclass of TimeTask for the JMX Timer service.

Version:
  $Revision: 1.8 $

Constructor Summary
`TimerTask(javax.management.timer.TimerNotification n, java.util.Date date, long period, long occurrences, boolean fixedRate)`

Method Summary
`boolean` `equals(java.lang.Object obj)`
`long` `getDate()`
`boolean` `getFixedRate()` Returns whether this task is a fixed rate or fixed delay task.
`long` `getNextExecutionTime()` Returns the next time at which the task will be executed, ie the `TimeTask.run()` method is called.
`javax.management.timer.TimerNotification` `getNotification()`
`long` `getOccurrences()`
`long` `getPeriod()` Returns the period of this task.
`int` `hashCode()`
`boolean` `isFinished()` Returns whethere this task is finished.
`boolean` `isPeriodic()` Returns whether this task is periodic.
`void` `setFinished(boolean value)` Marks this task as finished or not.
`void` `setNextExecutionTime(long time)` Sets the next execution time.

Methods inherited from class mx4j.timer.TimeTask
`compareTo, run`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TimerTask

    public TimerTask(javax.management.timer.TimerNotification n,
                     java.util.Date date,
                     long period,
                     long occurrences,
                     boolean fixedRate)

Method Detail

### getNotification

    public javax.management.timer.TimerNotification getNotification()

### isFinished

    public boolean isFinished()

  Description copied from class: `TimeTask`
  Returns whethere this task is finished.

  Overrides:
    `isFinished` in class `TimeTask`
  See Also:
    `TimeTask.setFinished(boolean)`

### setFinished

    public void setFinished(boolean value)

  Description copied from class: `TimeTask`
  Marks this task as finished or not. When a task is finished, its `TimeTask.run()` method will not be called anymore.

  Overrides:
    `setFinished` in class `TimeTask`
  See Also:
    `TimeTask.isFinished()`

### getPeriod

    public long getPeriod()

  Description copied from class: `TimeTask`
  Returns the period of this task. By default returns 0.

  Overrides:
    `getPeriod` in class `TimeTask`
  See Also:
    `TimeTask.isPeriodic()`

### isPeriodic

    public boolean isPeriodic()

  Description copied from class: `TimeTask`
  Returns whether this task is periodic. By default return false.

  Overrides:
    `isPeriodic` in class `TimeTask`
  See Also:
    `TimeTask.getPeriod()`

### getNextExecutionTime

    public long getNextExecutionTime()

  Description copied from class: `TimeTask`
  Returns the next time at which the task will be executed, ie the `TimeTask.run()` method is called.

  Overrides:
    `getNextExecutionTime` in class `TimeTask`
  See Also:
    `TimeTask.setNextExecutionTime(long)`

### setNextExecutionTime

    public void setNextExecutionTime(long time)

  Description copied from class: `TimeTask`
  Sets the next execution time.

  Overrides:
    `setNextExecutionTime` in class `TimeTask`
  See Also:
    `TimeTask.getNextExecutionTime()`

### hashCode

    public int hashCode()

### equals

    public boolean equals(java.lang.Object obj)

### getOccurrences

    public long getOccurrences()

### getDate

    public long getDate()

### getFixedRate

    public boolean getFixedRate()

  Description copied from class: `TimeTask`
  Returns whether this task is a fixed rate or fixed delay task. By default return false

  Overrides:
    `getFixedRate` in class `TimeTask`

Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.