Class PseudoTerminalModes

java.lang.Object
com.sshtools.client.PseudoTerminalModes

@Deprecated(since="3.1.2", forRemoval=true) public class PseudoTerminalModes extends Object
Deprecated, for removal: This API element is subject to removal in a future version.

When a client requests a pseudo terminal it informs the server of any terminal modes that it knows of. This is typically used in situations where advance terminal configuration is required but it can also be used to perform simple configuration such as turning off character echo.

NOTE: the server may ignore some of the modes set if it does not support them.

 var session = ssh.openSessionChannel();
 session.requestPseudoTerminal("vt100", 80, 24, 0, 0, PseudoTerminalModesBuilder.create().
                        // Turning off echo
                        withMode(PseudoTerminalModes.ECHO, false).
                        // Setting the Input/Output baud rate
                        withMode(PseudoTerminalModes.TTY_OP_ISPEED, 38400).
                        withMode(PseudoTerminalModes.TTY_OP_OSPEED, 38400).
                        build());
 

Deprecated, to be replaced by TerminalModes that allows the same object to be used by the client and the server.

Author:
Lee David Painter
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Deprecated, for removal: This API element is subject to removal in a future version.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    7 bit mode.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    8 bit mode.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable echoing.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Echo control characters as ^(Char).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Visually erase chars.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Kill character discards current line.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Visual erase for line kill.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Echo NL even if ECHO is off.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Canonicalize input lines.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Map CR to NL on input.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable extensions.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Ignore CR on input.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    The ignore parity flag.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Ring bell on input queue full.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Map NL into CR on input.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable checking of parity errors.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable signals INTR, QUIT, [D]SUSP.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Strip 8th bit off characters.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Translate uppercase characters to lowercase.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Output is assumed to be UTF-8
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Any char will restart after stop.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable input flow control.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable output flow control.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Don't flush after interrupt.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Translate carriage return to newline (output).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Convert lowercase to uppercase.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Map NL to CR-NL.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Newline performs a carriage return (output).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Translate newline to carriage return-newline (output).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable output processing.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Parity enable.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Mark parity and framing errors.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Odd parity, else even.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Retype pending input.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Stop background jobs from output.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Specifies the input baud rate in bits per second.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Specifies the output baud rate in bits per second.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Toggles the flushing of terminal output.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Another suspend character.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    End-of-file character (sends EOF from the terminal).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    End-of-line character in addition to carriage return and/or linefeed.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Additional end-of-line character.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Erase the character to left of the cursor.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Character to flush output.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Interrupt character; 255 if none.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Kill the current input line.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enter the next character typed literally, even if it is a special character
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    The quit character (sends SIGQUIT signal on POSIX systems).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reprints the current input line.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Continues paused output (normally control-Q).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Prints system status line (load, command, pid, etc).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Pauses output (normally control-S).
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Suspends the current program.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Switch to a different shell layer.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Erases a word left of cursor.
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Enable input and output of uppercase characters by preceding their lowercase equivalents with "\".
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    PseudoTerminalModes(byte[] modes)
    Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    setTerminalMode(int mode, boolean value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    setTerminalMode(int mode, int value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    byte[]
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the encoded modes for use by the SshSession.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VINTR

      public static final int VINTR
      Deprecated, for removal: This API element is subject to removal in a future version.
      Interrupt character; 255 if none.
      See Also:
    • VQUIT

      public static final int VQUIT
      Deprecated, for removal: This API element is subject to removal in a future version.
      The quit character (sends SIGQUIT signal on POSIX systems).
      See Also:
    • VERASE

      public static final int VERASE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Erase the character to left of the cursor.
      See Also:
    • VKILL

      public static final int VKILL
      Deprecated, for removal: This API element is subject to removal in a future version.
      Kill the current input line.
      See Also:
    • VEOF

      public static final int VEOF
      Deprecated, for removal: This API element is subject to removal in a future version.
      End-of-file character (sends EOF from the terminal).
      See Also:
    • VEOL

      public static final int VEOL
      Deprecated, for removal: This API element is subject to removal in a future version.
      End-of-line character in addition to carriage return and/or linefeed.
      See Also:
    • VEOL2

      public static final int VEOL2
      Deprecated, for removal: This API element is subject to removal in a future version.
      Additional end-of-line character.
      See Also:
    • VSTART

      public static final int VSTART
      Deprecated, for removal: This API element is subject to removal in a future version.
      Continues paused output (normally control-Q).
      See Also:
    • VSTOP

      public static final int VSTOP
      Deprecated, for removal: This API element is subject to removal in a future version.
      Pauses output (normally control-S).
      See Also:
    • VSUSP

      public static final int VSUSP
      Deprecated, for removal: This API element is subject to removal in a future version.
      Suspends the current program.
      See Also:
    • VDSUSP

      public static final int VDSUSP
      Deprecated, for removal: This API element is subject to removal in a future version.
      Another suspend character.
      See Also:
    • VREPRINT

      public static final int VREPRINT
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reprints the current input line.
      See Also:
    • VWERASE

      public static final int VWERASE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Erases a word left of cursor.
      See Also:
    • VLNEXT

      public static final int VLNEXT
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enter the next character typed literally, even if it is a special character
      See Also:
    • VFLUSH

      public static final int VFLUSH
      Deprecated, for removal: This API element is subject to removal in a future version.
      Character to flush output.
      See Also:
    • VSWITCH

      public static final int VSWITCH
      Deprecated, for removal: This API element is subject to removal in a future version.
      Switch to a different shell layer.
      See Also:
    • VSTATUS

      public static final int VSTATUS
      Deprecated, for removal: This API element is subject to removal in a future version.
      Prints system status line (load, command, pid, etc).
      See Also:
    • VDISCARD

      public static final int VDISCARD
      Deprecated, for removal: This API element is subject to removal in a future version.
      Toggles the flushing of terminal output.
      See Also:
    • IGNPAR

      public static final int IGNPAR
      Deprecated, for removal: This API element is subject to removal in a future version.
      The ignore parity flag. The parameter SHOULD be 0 if this flag is FALSE, and 1 if it is TRUE.
      See Also:
    • PARMRK

      public static final int PARMRK
      Deprecated, for removal: This API element is subject to removal in a future version.
      Mark parity and framing errors.
      See Also:
    • INPCK

      public static final int INPCK
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable checking of parity errors.
      See Also:
    • ISTRIP

      public static final int ISTRIP
      Deprecated, for removal: This API element is subject to removal in a future version.
      Strip 8th bit off characters.
      See Also:
    • INLCR

      public static final int INLCR
      Deprecated, for removal: This API element is subject to removal in a future version.
      Map NL into CR on input.
      See Also:
    • IGNCR

      public static final int IGNCR
      Deprecated, for removal: This API element is subject to removal in a future version.
      Ignore CR on input.
      See Also:
    • ICRNL

      public static final int ICRNL
      Deprecated, for removal: This API element is subject to removal in a future version.
      Map CR to NL on input.
      See Also:
    • IUCLC

      public static final int IUCLC
      Deprecated, for removal: This API element is subject to removal in a future version.
      Translate uppercase characters to lowercase.
      See Also:
    • IXON

      public static final int IXON
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable output flow control.
      See Also:
    • IXANY

      public static final int IXANY
      Deprecated, for removal: This API element is subject to removal in a future version.
      Any char will restart after stop.
      See Also:
    • IXOFF

      public static final int IXOFF
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable input flow control.
      See Also:
    • IMAXBEL

      public static final int IMAXBEL
      Deprecated, for removal: This API element is subject to removal in a future version.
      Ring bell on input queue full.
      See Also:
    • IUTF8

      public static final int IUTF8
      Deprecated, for removal: This API element is subject to removal in a future version.
      Output is assumed to be UTF-8
      See Also:
    • ISIG

      public static final int ISIG
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable signals INTR, QUIT, [D]SUSP.
      See Also:
    • ICANON

      public static final int ICANON
      Deprecated, for removal: This API element is subject to removal in a future version.
      Canonicalize input lines.
      See Also:
    • XCASE

      public static final int XCASE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable input and output of uppercase characters by preceding their lowercase equivalents with "\".
      See Also:
    • ECHO

      public static final int ECHO
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable echoing.
      See Also:
    • ECHOE

      public static final int ECHOE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Visually erase chars.
      See Also:
    • ECHOK

      public static final int ECHOK
      Deprecated, for removal: This API element is subject to removal in a future version.
      Kill character discards current line.
      See Also:
    • ECHONL

      public static final int ECHONL
      Deprecated, for removal: This API element is subject to removal in a future version.
      Echo NL even if ECHO is off.
      See Also:
    • NOFLSH

      public static final int NOFLSH
      Deprecated, for removal: This API element is subject to removal in a future version.
      Don't flush after interrupt.
      See Also:
    • TOSTOP

      public static final int TOSTOP
      Deprecated, for removal: This API element is subject to removal in a future version.
      Stop background jobs from output.
      See Also:
    • IEXTEN

      public static final int IEXTEN
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable extensions.
      See Also:
    • ECHOCTL

      public static final int ECHOCTL
      Deprecated, for removal: This API element is subject to removal in a future version.
      Echo control characters as ^(Char).
      See Also:
    • ECHOKE

      public static final int ECHOKE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Visual erase for line kill.
      See Also:
    • PENDIN

      public static final int PENDIN
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retype pending input.
      See Also:
    • OPOST

      public static final int OPOST
      Deprecated, for removal: This API element is subject to removal in a future version.
      Enable output processing.
      See Also:
    • OLCUC

      public static final int OLCUC
      Deprecated, for removal: This API element is subject to removal in a future version.
      Convert lowercase to uppercase.
      See Also:
    • ONLCR

      public static final int ONLCR
      Deprecated, for removal: This API element is subject to removal in a future version.
      Map NL to CR-NL.
      See Also:
    • OCRNL

      public static final int OCRNL
      Deprecated, for removal: This API element is subject to removal in a future version.
      Translate carriage return to newline (output).
      See Also:
    • ONOCR

      public static final int ONOCR
      Deprecated, for removal: This API element is subject to removal in a future version.
      Translate newline to carriage return-newline (output).
      See Also:
    • ONLRET

      public static final int ONLRET
      Deprecated, for removal: This API element is subject to removal in a future version.
      Newline performs a carriage return (output).
      See Also:
    • CS7

      public static final int CS7
      Deprecated, for removal: This API element is subject to removal in a future version.
      7 bit mode.
      See Also:
    • CS8

      public static final int CS8
      Deprecated, for removal: This API element is subject to removal in a future version.
      8 bit mode.
      See Also:
    • PARENB

      public static final int PARENB
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parity enable.
      See Also:
    • PARODD

      public static final int PARODD
      Deprecated, for removal: This API element is subject to removal in a future version.
      Odd parity, else even.
      See Also:
    • TTY_OP_ISPEED

      public static final int TTY_OP_ISPEED
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specifies the input baud rate in bits per second.
      See Also:
    • TTY_OP_OSPEED

      public static final int TTY_OP_OSPEED
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specifies the output baud rate in bits per second.
      See Also:
  • Constructor Details

  • Method Details

    • reset

      @Deprecated(since="3.1.0", forRemoval=true) public void reset()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clear the modes
    • setTerminalMode

      @Deprecated(since="3.1.0", forRemoval=true) public void setTerminalMode(int mode, int value) throws SshException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set an integer value mode
      Parameters:
      mode - int
      value - int
      Throws:
      SshException
    • setTerminalMode

      @Deprecated(since="3.1.0", forRemoval=true) public void setTerminalMode(int mode, boolean value) throws SshException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set a boolean value mode
      Parameters:
      mode - int
      value - boolean
      Throws:
      SshException
    • toByteArray

      public byte[] toByteArray()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the encoded modes for use by the SshSession.
      Returns:
      byte[]