// Repeat every 1 second
@Override
    public synchronized void connected(final Mesos mesos) {
      System.out.println("Connected");
      state = State.CONNECTED;
      retryTimer = new Timer();
      retryTimer.schedule(new TimerTask() {
        @Override
        public void run() {
          doReliableRegistration(mesos);
        }
      }, 0, 1000); // Repeat every 1 second
    }
doReliableRegistration(mesos);
}
}, 0, 1000); // Repeat every 1 second
}
@Override
public synchronized void connected(final Mesos mesos) {
System.out.println("Connected");
state = State.CONNECTED;
retryTimer = new Timer();
retryTimer.schedule(new TimerTask() {
@Override
public void run() {
doReliableRegistration(mesos);
}
}, 0, 1000); // Repeat every 1 second
}
@Override
public synchronized void connected(final Mesos mesos) {
System.out.println("Connected");
state = State.CONNECTED;
retryTimer = new Timer();
retryTimer.schedule(new TimerTask() {
@Override
public void run() {
doReliableRegistration(mesos);
}
}, 0, 1000); // Repeat every 1 second
}