예제 #1
0
 public void stopDaemon() {
   scheduledTask.cancel(true);
   scheduler.shutdownNow();
 }
예제 #2
0
 public void startDaemon() {
   scheduledTask = scheduler.scheduleAtFixedRate(this, 1, 1, TimeUnit.SECONDS);
 }