Example usage for javax.management.timer Timer Timer

List of usage examples for javax.management.timer Timer Timer

Introduction

In this page you can find the example usage for javax.management.timer Timer Timer.

Prototype

public Timer() 

Source Link

Document

Default constructor.

Usage

From source file:org.accada.epcis.repository.query.QuerySubscriptionScheduled.java

/**
 * Starts a Timer to get this query executed in specific time intervals.
 * /* ww  w . j  a va  2  s . c  o  m*/
 * @throws ImplementationException
 *             If the next scheduled date cannot be evaluated.
 */
private void startThread() throws ImplementationExceptionResponse {
    Timer nextAction = new Timer();
    nextAction.addNotificationListener(this, null, nextAction);

    Date nextSchedule = schedule.nextScheduledTime().getTime();
    nextAction.addNotification("SubscriptionSchedule", "Please do the query", null, nextSchedule);
    nextAction.start();
}