com.mindbright.net.telnet
Interface TelnetEventHandler

All Known Implementing Classes:
ModuleTelnetImpl.ChaffedTelnet, 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

void interpretAsCommand(int cmd)
Called to handle some telnet protocol commands from the server.


optionNegotiation

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

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

void receiveData(byte b)
Handle a byte received from the server.