private void scheduleReRegistration() {
   ReRegisterTask reRegisterTask = new ReRegisterTask();
   reRegisterTimer.schedule(reRegisterTask, expires * 1000);
 }
  private void cancelPendingRegistrations() {
    reRegisterTimer.cancel();
    reRegisterTimer = null;

    reRegisterTimer = new Timer();
  }