List of usage examples for javax.management.timer Timer addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
From source file:org.accada.epcis.repository.query.QuerySubscriptionScheduled.java
/** * Starts a Timer to get this query executed in specific time intervals. * /* w ww . j a v a 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(); }