Class TerminalTypeOptionHandler

java.lang.Object
org.apache.commons.net.telnet.TelnetOptionHandler
org.apache.commons.net.telnet.TerminalTypeOptionHandler

Implements the telnet terminal type option RFC 1091.
  • Field Details

  • Constructor Details

    • TerminalTypeOptionHandler

      Constructor for the TerminalTypeOptionHandler. Initial and accept behavior flags are set to false
      Parameters:
      termtype - - terminal type that will be negotiated.
    • TerminalTypeOptionHandler

      public TerminalTypeOptionHandler(String termtype, boolean initlocal, boolean initremote, boolean acceptlocal, boolean acceptremote)
      Constructor for the TerminalTypeOptionHandler. Allows defining desired initial setting for local/remote activation of this option and behavior in case a local/remote activation request for this option is received.
      Parameters:
      termtype - - terminal type that will be negotiated.
      initlocal - - if set to true, a WILL is sent upon connection.
      initremote - - if set to true, a DO is sent upon connection.
      acceptlocal - - if set to true, any DO request is accepted.
      acceptremote - - if set to true, any WILL request is accepted.
  • Method Details

    • answerSubnegotiation

      public int[] answerSubnegotiation(int[] suboptionData, int suboptionLength)
      Implements the abstract method of TelnetOptionHandler.
      Overrides:
      answerSubnegotiation in class TelnetOptionHandler
      Parameters:
      suboptionData - - the sequence received, without IAC SB & IAC SE
      suboptionLength - - the length of data in suboption_data
      Returns:
      terminal type information