Class DefaultShellContext
java.lang.Object
org.springframework.shell.context.DefaultShellContext
- All Implemented Interfaces:
ShellContext
Default implementation of a
ShellContext.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets an interaction mode.booleanhasPty()Gets if shell has a properptyterminal.voidsetInteractionMode(InteractionMode interactionMode) Sets an interaction mode.
-
Constructor Details
-
DefaultShellContext
public DefaultShellContext() -
DefaultShellContext
public DefaultShellContext(boolean pty)
-
-
Method Details
-
getInteractionMode
Description copied from interface:ShellContextGets an interaction mode.- Specified by:
getInteractionModein interfaceShellContext- Returns:
- a current interaction mode
-
setInteractionMode
Description copied from interface:ShellContextSets an interaction mode.- Specified by:
setInteractionModein interfaceShellContext- Parameters:
interactionMode- the interaction mode
-
hasPty
public boolean hasPty()Description copied from interface:ShellContextGets if shell has a properptyterminal. Terminal don't haveptyin 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:
hasPtyin interfaceShellContext- Returns:
trueif terminal has pty features
-