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