Class LanternaUI

java.lang.Object
fr.ens.biologie.genomique.eoulsan.ui.LanternaUI
All Implemented Interfaces:
com.googlecode.lanterna.terminal.TerminalResizeListener, StepObserver, UI

public class LanternaUI extends Object implements com.googlecode.lanterna.terminal.TerminalResizeListener
This class define an UI using Lanterna library.
Since:
2.0
Author:
Laurent Jourdren
  • Constructor Details

    • LanternaUI

      public LanternaUI()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: UI
      Get the name of the UI.
      Specified by:
      getName in interface UI
      Returns:
      the name of the UI
    • init

      public void init(Workflow workflow)
      Description copied from interface: UI
      Initialize the UI.
      Specified by:
      init in interface UI
      Parameters:
      workflow - the worflow
    • notifyStepState

      public void notifyStepState(Step step, Step.StepState stepState)
      Description copied from interface: StepObserver
      The status of the step has been changed.
      Specified by:
      notifyStepState in interface StepObserver
      Parameters:
      step - step that the status has been changed
      stepState - state the step state
    • notifyStepState

      public void notifyStepState(Step step, int contextId, String contextName, double progress)
      Description copied from interface: StepObserver
      The progress of the step for a sample has been changed.
      Specified by:
      notifyStepState in interface StepObserver
      Parameters:
      step - step that the progress has been changed
      contextId - id of the context
      contextName - name of the context that has been changed
      progress - progress value
    • notifyStepState

      public void notifyStepState(Step step, int terminatedTasks, int submittedTasks, double progress)
      Description copied from interface: StepObserver
      The progress of the step has been changed.
      Specified by:
      notifyStepState in interface StepObserver
      Parameters:
      step - step that the progress has been changed
      terminatedTasks - the terminated tasks count
      submittedTasks - the submitted tasks count
      progress - the progress of the step
    • notifyStepState

      public void notifyStepState(Step step, String note)
      Description copied from interface: StepObserver
      The note of the step has been changed.
      Specified by:
      notifyStepState in interface StepObserver
      Parameters:
      step - step that the note has been changed
      note - the note content
    • notifyWorkflowSuccess

      public void notifyWorkflowSuccess(boolean success, String message)
      Description copied from interface: StepObserver
      Notify the success of the workflow.
      Specified by:
      notifyWorkflowSuccess in interface StepObserver
      Parameters:
      success - the success of the workflow
      message - success message
    • notifyTaskSubmitted

      public void notifyTaskSubmitted(Step step, int contextId)
      Description copied from interface: StepObserver
      Notify that a task has been submitted.
      Specified by:
      notifyTaskSubmitted in interface StepObserver
      Parameters:
      step - the step of the submitted task
      contextId - id of the context
    • notifyTaskRunning

      public void notifyTaskRunning(Step step, int contextId)
      Description copied from interface: StepObserver
      Notify that a task is running.
      Specified by:
      notifyTaskRunning in interface StepObserver
      Parameters:
      step - the step of the submitted task
      contextId - id of the context
    • notifyTaskDone

      public void notifyTaskDone(Step step, int contextId)
      Description copied from interface: StepObserver
      Notify that a task has been done.
      Specified by:
      notifyTaskDone in interface StepObserver
      Parameters:
      step - the step of the submitted task
      contextId - id of the context
    • onResized

      public void onResized(com.googlecode.lanterna.terminal.Terminal terminal, com.googlecode.lanterna.TerminalSize newSize)
      Specified by:
      onResized in interface com.googlecode.lanterna.terminal.TerminalResizeListener