void notifyFailure(Throwable exception){
synchronized (waitObject) {
    isComplete=true;
    if (exception instanceof MqttException) {
      pendingException=(MqttException)exception;
    }
 else {
      pendingException=new MqttException(exception);
    }
    waitObject.notifyAll();
    if (exception instanceof MqttException) {
      lastException=(MqttException)exception;
    }
    if (listener != null) {
      listener.onFailure(this,exception);
    }
  }
}

void notifyFailure ( Throwable exception ) { synchronized ( waitObject ) { isComplete = true ; if ( exception instanceof MqttException ) { pendingException = ( MqttException ) exception ; } else { pendingException = new MqttException ( exception ) ; } waitObject . notifyAll ( ) ; if ( exception instanceof MqttException ) { lastException = ( MqttException ) exception ; } if ( listener != null ) { listener . onFailure ( this , exception ) ; } } }
notify unsuccessful completion of the operation
