@Override
  public void onAction(Action action) {
    if (action instanceof ReadLogFiles) {
      getView().list(logStore.getLogFiles());

    } else if (action instanceof StreamLogFile) {
      streamingProgress.done();
      getView().open(logStore.getActiveLogFile());

    } else if (action instanceof SelectLogFile) {
      getView().open(logStore.getActiveLogFile());

    } else if (action instanceof SelectServerInstance) {
      onReset();
    }
  }
 @Override
 protected void onReset() {
   super.onReset();
   circuit.dispatch(new ReadLogFiles());
   if (getView().isLogFileSelected() && logStore.getActiveLogFile() != null) {
     circuit.dispatch(new SelectLogFile(logStore.getActiveLogFile().getName()));
   }
 }
 public void onStreamLogFile(final String logFile, final int fileSize) {
   if (logStore.isOpen(logFile)) {
     this.circuit.dispatch(new SelectLogFile(logFile));
   } else {
     if (fileSize > LOG_FILE_SIZE_THRESHOLD) {
       Feedback.confirm(
           "Download Log File",
           "Downloading this log file may take some time. Do you want to proceed?",
           new Feedback.ConfirmationHandler() {
             @Override
             public void onConfirmation(boolean isConfirmed) {
               if (isConfirmed) {
                 streamingProgress.monitor(logFile);
               }
             }
           });
     } else {
       streamingProgress.monitor(logFile);
     }
   }
 }