Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mindbright.net.telnet
Interface TelnetEventHandler

All Known Implementing Classes:
  TelnetTerminalAdapter

public interface TelnetEventHandler

Interface for class which wants to receive data from a telnet session.

Method Summary
`void` | `interpretAsCommand(int cmd)` Called to handle some telnet protocol commands from the server.
`boolean` | `optionNegotiation(int option, int request)` Called to handle option negotiation packets from the server.
`void` | `optionSubNegotiation(int option, byte[] params)` Called to handle option negotiation packets from the server.
`void` | `receiveData(byte b)` Handle a byte received from the server.

Method Detail

### interpretAsCommand

    public void interpretAsCommand(int cmd)

  Called to handle some telnet protocol commands from the server.

### optionNegotiation

    public boolean optionNegotiation(int option,
                                     int request)
                              throws java.io.IOException

  Called to handle option negotiation packets from the server. The implementation is expected to modify its internal state accordingly and reply by invoking the relevant function (like `doOption` and `willOption`

  Throws:
    `java.io.IOException`

### optionSubNegotiation

    public void optionSubNegotiation(int option,
                                     byte[] params)
                              throws java.io.IOException

  Called to handle option negotiation packets from the server. The implementation is expected to modify its internal state accordingly and reply by invoking the relevant function (like `sendOptionSubNegotiation`

  Throws:
    `java.io.IOException`

### receiveData

    public void receiveData(byte b)

  Handle a byte received from the server.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD