public void stop(){
  if (null != periodicTickTask) {
    stopTask(periodicTickTask);
  }
  if (null != periodicTickExecutorService) {
    periodicTickExecutorService.shutdownNow();
  }
}

public void stop ( ) { if ( null != periodicTickTask ) { stopTask ( periodicTickTask ) ; } if ( null != periodicTickExecutorService ) { periodicTickExecutorService . shutdownNow ( ) ; } }
calling this method will stop all threads . this is needed when using javafx on mobile devices when the device goes to sleep mode .
