Interface TelnetCommListener

All Known Implementing Classes:
HostSession3270, HostSession5250

public interface TelnetCommListener
The Telnet communication listener.
Author:
Christopher Mindus
  • Method Details

    • onCommOpen

      void onCommOpen(TelnetComm comm)
      Called when the communication link is opened.
      Parameters:
      comm - The telnet communication instance.
    • onCommState

      void onCommState(SocketCommNIO comm)
      Called when the state changes.
      Parameters:
      comm - Socket communication instance.
    • onCommConnected

      void onCommConnected(TelnetComm comm)
      Called when the communication link is connected.
      Parameters:
      comm - The telnet communication instance.
    • hostAcceptedDataStream

      void hostAcceptedDataStream(TelnetComm comm, String terminalType) throws IOException
      The host accepted the options for the terminal type and went into BINARY mode. This means that 3270/5250 data stream will follow. Inform the host session listener of a connect change.
      Parameters:
      comm - The telnet communication instance.
      terminalType - The terminal type accepted by the host at Telnet terminal negotiation.
      Throws:
      IOException - If an I/O error occurs.
    • processInboundDataStream

      void processInboundDataStream(TelnetComm comm, byte[] inputBuf, int pos, int inputBufLen) throws IOException
      Processes the inbound 3270 or 5250 data stream.
      Parameters:
      comm - The telnet communication instance.
      inputBuf - The input buffer.
      pos - Start position in buffer.
      inputBufLen - Length of input buffer.
      Throws:
      IOException - If an I/O error occurs.
    • processInboundSCSDataStream

      void processInboundSCSDataStream(TelnetComm comm, byte[] inputBuf, int inputBufLen) throws IOException
      Processes the inbound 3270 printer data stream. Processing of the buffer always starts at position 0.
      Parameters:
      comm - The telnet communication instance.
      inputBuf - The input buffer.
      inputBufLen - Length of input buffer.
      Throws:
      IOException - If an I/O error occurs.
    • processInboundSSCPLUDataStream

      void processInboundSSCPLUDataStream(TelnetComm comm, byte[] inputBuf, int pos, int inputBufLen) throws IOException
      Processes the inbound 3270 SSCP-LU data stream.
      Parameters:
      comm - The telnet communication instance.
      inputBuf - The input buffer.
      pos - Start position in buffer.
      inputBufLen - Length of input buffer.
      Throws:
      IOException - If an I/O error occurs.
    • processPrintEOJ

      void processPrintEOJ(TelnetComm comm) throws IOException
      Processes a Print End-of-Job for 3270 printers.
      Parameters:
      comm - The telnet communication instance.
      Throws:
      IOException - If an I/O error occurs.
    • onCommError

      void onCommError(TelnetComm comm, IOException e)
      Called when the communication link is closed.
      Parameters:
      comm - The telnet communication instance.
      e - The exception.
    • onCommClosed

      void onCommClosed(TelnetComm comm)
      Called when the communication link is closed.
      Parameters:
      comm - The telnet communication instance.