Package org.jline.terminal
Enum Class Terminal.Signal
- All Implemented Interfaces:
Serializable
,Comparable<Terminal.Signal>
,Constable
- Enclosing interface:
Terminal
Types of signals that can be handled by terminal applications.
Signals represent asynchronous notifications that can be sent to the application in response to certain events or user actions. Each signal type corresponds to a specific event or key combination:
INT
- Interrupt signal (typically Ctrl+C)QUIT
- Quit signal (typically Ctrl+\)TSTP
- Terminal stop signal (typically Ctrl+Z)CONT
- Continue signal (sent when resuming after TSTP)INFO
- Information signal (typically Ctrl+T on BSD systems)WINCH
- Window change signal (sent when terminal size changes)
Note that signal handling behavior may vary across different platforms and terminal implementations. Some signals may not be available or may behave differently on certain systems.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionContinue signal, sent when resuming a process after suspension.Information signal, typically generated by pressing Ctrl+T on BSD systems.Interrupt signal, typically generated by pressing Ctrl+C.Quit signal, typically generated by pressing Ctrl+\.Terminal stop signal, typically generated by pressing Ctrl+Z.Window change signal, sent when the terminal window size changes. -
Method Summary
Modifier and TypeMethodDescriptionstatic Terminal.Signal
Returns the enum constant of this class with the specified name.static Terminal.Signal[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INT
Interrupt signal, typically generated by pressing Ctrl+C. Used to interrupt or terminate a running process. -
QUIT
Quit signal, typically generated by pressing Ctrl+\. Often used to force a core dump or immediate termination. Note: The JVM does not easily allow catching this signal natively. -
TSTP
Terminal stop signal, typically generated by pressing Ctrl+Z. Used to suspend the current process. -
CONT
Continue signal, sent when resuming a process after suspension. This signal is sent to a process when it's resumed after being stopped by TSTP. -
INFO
Information signal, typically generated by pressing Ctrl+T on BSD systems. Used to request status information from a running process. -
WINCH
Window change signal, sent when the terminal window size changes. Applications can handle this signal to adjust their display accordingly.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-