com.mindbright.net.telnet
Class TelnetTerminalAdapter

java.lang.Object
  extended bycom.mindbright.terminal.TerminalInputChaff
      extended bycom.mindbright.net.telnet.TelnetTerminalAdapter
All Implemented Interfaces:
java.lang.Runnable, TelnetEventHandler, TerminalInputListener
Direct Known Subclasses:
ModuleTelnetImpl.ChaffedTelnet

public class TelnetTerminalAdapter
extends TerminalInputChaff
implements TelnetEventHandler


Constructor Summary
TelnetTerminalAdapter(java.io.InputStream in, java.io.OutputStream out, Terminal terminal)
           
 
Method Summary
 TelnetNVT getTelnetNVT()
           
 void interpretAsCommand(int cmd)
           
 boolean isBuffered()
           
 boolean optionNegotiation(int option, int request)
           
 void optionSubNegotiation(int option, byte[] params)
           
 void receiveData(char c)
           
 void sendBytes(byte[] b)
           
protected  void sendFakeChar()
           
protected  void sendTypedChar(int c)
           
 void signalWindowChanged(int rows, int cols, int vpixels, int hpixels)
           
 
Methods inherited from class com.mindbright.terminal.TerminalInputChaff
dispenseChaff, run, startChaff, stopChaff, typedChar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelnetTerminalAdapter

public TelnetTerminalAdapter(java.io.InputStream in,
                             java.io.OutputStream out,
                             Terminal terminal)
Method Detail

getTelnetNVT

public TelnetNVT getTelnetNVT()

isBuffered

public boolean isBuffered()

interpretAsCommand

public void interpretAsCommand(int cmd)
Specified by:
interpretAsCommand in interface TelnetEventHandler

optionSubNegotiation

public void optionSubNegotiation(int option,
                                 byte[] params)
                          throws java.io.IOException
Specified by:
optionSubNegotiation in interface TelnetEventHandler
Throws:
java.io.IOException

optionNegotiation

public boolean optionNegotiation(int option,
                                 int request)
                          throws java.io.IOException
Specified by:
optionNegotiation in interface TelnetEventHandler
Throws:
java.io.IOException

receiveData

public void receiveData(char c)
Specified by:
receiveData in interface TelnetEventHandler

sendTypedChar

protected void sendTypedChar(int c)
Specified by:
sendTypedChar in class TerminalInputChaff

sendFakeChar

protected void sendFakeChar()
Specified by:
sendFakeChar in class TerminalInputChaff

sendBytes

public void sendBytes(byte[] b)
Specified by:
sendBytes in interface TerminalInputListener

signalWindowChanged

public void signalWindowChanged(int rows,
                                int cols,
                                int vpixels,
                                int hpixels)
Specified by:
signalWindowChanged in interface TerminalInputListener