Class TelnetClientHandler

java.lang.Object
ecmwf.common.telnet.TelnetClientHandler
Direct Known Subclasses:
TelnetWrapper

public abstract class TelnetClientHandler extends Object
The Class TelnetClientHandler.
  • Field Details

    • TELOPT_BINARY

      public static final byte TELOPT_BINARY
      The Constant TELOPT_BINARY.
      See Also:
    • TELOPT_ECHO

      public static final byte TELOPT_ECHO
      The Constant TELOPT_ECHO.
      See Also:
    • TELOPT_SGA

      public static final byte TELOPT_SGA
      The Constant TELOPT_SGA.
      See Also:
    • TELOPT_EOR

      public static final byte TELOPT_EOR
      The Constant TELOPT_EOR.
      See Also:
    • TELOPT_NAWS

      public static final byte TELOPT_NAWS
      The Constant TELOPT_NAWS.
      See Also:
    • TELOPT_TTYPE

      public static final byte TELOPT_TTYPE
      The Constant TELOPT_TTYPE.
      See Also:
  • Constructor Details

    • TelnetClientHandler

      public TelnetClientHandler()
      Instantiates a new telnet client handler.
  • Method Details

    • getTerminalType

      protected abstract String getTerminalType()
      Gets the terminal type.
      Returns:
      the terminal type
    • getWindowSize

      protected abstract TelnetDimension getWindowSize()
      Gets the window size.
      Returns:
      the window size
    • setLocalEcho

      protected abstract void setLocalEcho(boolean echo)
      Sets the local echo.
      Parameters:
      echo - the new local echo
    • notifyEndOfRecord

      protected abstract void notifyEndOfRecord()
      Notify end of record.
    • write

      protected abstract void write(byte[] b) throws IOException
      Write.
      Parameters:
      b - the b
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • reset

      public void reset()
      Reset.
    • sendTelnetControl

      public void sendTelnetControl(byte code) throws IOException
      Sends the telnet control.
      Parameters:
      code - the code
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • startup

      public void startup() throws IOException
      Startup.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • transpose

      public void transpose(byte[] buf) throws IOException
      Transpose.
      Parameters:
      buf - the buf
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • setCRLF

      public void setCRLF(String xcrlf)
      Sets the crlf.
      Parameters:
      xcrlf - the new crlf
    • setCR

      public void setCR(String xcr)
      Sets the cr.
      Parameters:
      xcr - the new cr
    • negotiate

      public int negotiate(byte[] nbuf) throws IOException
      Negotiate.
      Parameters:
      nbuf - the nbuf
      Returns:
      the int
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • inputfeed

      public void inputfeed(byte[] b, int len)
      Inputfeed.
      Parameters:
      b - the b
      len - the len
    • sendDisplayLocation

      public void sendDisplayLocation(String display) throws IOException
      Sends the display location.
      Parameters:
      display - the display
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • sendEnv

      public void sendEnv(String name, String value) throws IOException
      Sends the env.
      Parameters:
      name - the name
      value - the value
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • sendOption

      public void sendOption(char option, boolean state) throws IOException
      Sends the option.
      Parameters:
      option - the option
      state - the state
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • subNegotiation

      public void subNegotiation(char option, char[] params) throws IOException
      Sub negotiation.
      Parameters:
      option - the option
      params - the params
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • sendOptionRequest

      public void sendOptionRequest(byte option, boolean state) throws IOException
      Sends the option request.
      Parameters:
      option - the option
      state - the state
      Throws:
      IOException - Signals that an I/O exception has occurred.