Class DefaultShellContext

java.lang.Object
org.springframework.shell.context.DefaultShellContext
All Implemented Interfaces:
ShellContext

public class DefaultShellContext extends Object implements ShellContext
Default implementation of a ShellContext.
  • Constructor Details

    • DefaultShellContext

      public DefaultShellContext()
    • DefaultShellContext

      public DefaultShellContext(boolean pty)
  • Method Details

    • getInteractionMode

      public InteractionMode getInteractionMode()
      Description copied from interface: ShellContext
      Gets an interaction mode.
      Specified by:
      getInteractionMode in interface ShellContext
      Returns:
      a current interaction mode
    • setInteractionMode

      public void setInteractionMode(InteractionMode interactionMode)
      Description copied from interface: ShellContext
      Sets an interaction mode.
      Specified by:
      setInteractionMode in interface ShellContext
      Parameters:
      interactionMode - the interaction mode
    • hasPty

      public boolean hasPty()
      Description copied from interface: ShellContext
      Gets if shell has a proper pty terminal. Terminal don't have pty in cases where output is piped into a file or terminal is run in an ci system where there is no real user interaction.
      Specified by:
      hasPty in interface ShellContext
      Returns:
      true if terminal has pty features