Example usage for javax.management.timer Timer start

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

Introduction

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

Prototype

public synchronized void start() 

Source Link

Document

Starts the timer.

Usage

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

/**
 * Starts a Timer to get this query executed in specific time intervals.
 * /*w w w  .j  ava2  s .c  om*/
 * @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();
}