public void dispose(final boolean manual){
  mRunning=false;
  try {
    if (mConnection != null) {
      mConnection.close();
      Logger.d(TAG,"connection is closed");
    }
    if (mChannel != null) {
      Logger.d(TAG,"channel is aborted");
      mChannel.abort();
    }
  }
 catch (  final IOException e) {
    Logger.d(TAG,"connection is closed");
    e.printStackTrace();
  }
catch (  final AlreadyClosedException e) {
    e.printStackTrace();
  }
catch (  final ShutdownSignalException e) {
    Logger.d(TAG,"exception");
  }
 finally {
    if (mOnDisconnectCallback != null) {
      mOnDisconnectCallback.onDisconnect(manual);
    }
  }
}

public void dispose ( final boolean manual ) { mRunning = false ; try { if ( mConnection != null ) { mConnection . close ( ) ; Logger . d ( TAG , "connection is closed" ) ; } if ( mChannel != null ) { Logger . d ( TAG , "channel is aborted" ) ; mChannel . abort ( ) ; } } catch ( final IOException e ) { Logger . d ( TAG , "connection is closed" ) ; e . printStackTrace ( ) ; } catch ( final AlreadyClosedException e ) { e . printStackTrace ( ) ; } catch ( final ShutdownSignalException e ) { Logger . d ( TAG , "exception" ) ; } finally { if ( mOnDisconnectCallback != null ) { mOnDisconnectCallback . onDisconnect ( manual ) ; } } }
disconnect from the broker
