question: public void disconnect ( ) { connected = false ; synchronized ( connLostWait ) { connLostWait . notify ( ) ; } if ( mqtt != null ) { try { mqtt . disconnect ( ) ; } catch ( Exception ex ) { setTitleText ( "MQTT disconnect error !" ) ; ex . printStackTrace ( ) ; System . exit ( 1 ) ; } } if ( led . isFlashing ( ) ) { led . setFlash ( ) ; } led . setRed ( ) ; setConnected ( false ) ; synchronized ( this ) { writeLogln ( "WebSphere MQ Telemetry transport disconnected" ) ; } }
target:  A wrapper for the MQTT disconnect method. As well as disconnecting the protocol this method enables / disables buttons as appropriate when in disconnected state. It also sets the correct colour of the indicator LED.