protected void reconnect() { if (monitorThread != null) { // let's end the old thread monitorThread.interrupt(); monitorThread = null; } // create a new thread for listening to the FritzBox monitorThread = new MonitorThread(this.eventPublisher, this.providers); monitorThread.start(); }
public void deactivate() { if (monitorThread != null) { monitorThread.interrupt(); } monitorThread = null; }