|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mindbright.terminal.TerminalInputChaff
com.mindbright.net.telnet.TelnetTerminalAdapter
Glue class which connects a TerminalWindow to a
telnet server.
TelnetNVT,
TerminalWindow,
TerminalInputChaff| Constructor Summary | |
TelnetTerminalAdapter(java.io.InputStream in,
java.io.OutputStream out,
TerminalWindow terminal)
Connects the given TerminalWindow to a telnet
server at the other end of the provided streams. |
|
| Method Summary | |
TelnetNVT |
getTelnetNVT()
Get the underlying telnet protocol instance. |
void |
interpretAsCommand(int cmd)
Called to handle some telnet protocol commands from the server. |
boolean |
isBuffered()
Tells if input is sent directly to server (raw mode) or line by line (cooked). |
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. |
void |
sendBreak()
Send a break to the terminal server. |
void |
sendBytes(byte[] b)
Send a number of bytes to the server. |
protected void |
sendFakeChar()
Send a fake character to the server. |
protected void |
sendTypedChar(int c)
Send a typed char to the server. |
void |
signalWindowChanged(int rows,
int cols,
int vpixels,
int hpixels)
Tell the telnet server that our window has changed size. |
| Methods inherited from class com.mindbright.terminal.TerminalInputChaff |
dispenseChaff, isChaffActive, run, signalTermTypeChanged, startChaff, stopChaff, typedChar, typedChar |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TelnetTerminalAdapter(java.io.InputStream in,
java.io.OutputStream out,
TerminalWindow terminal)
TerminalWindow to a telnet
server at the other end of the provided streams.
in - stream from which data from the telnet server is readout - stream over which to send data to the telnet serverterminal - instance of terminal window to connect to| Method Detail |
public TelnetNVT getTelnetNVT()
public boolean isBuffered()
public void interpretAsCommand(int cmd)
TelnetEventHandler
interpretAsCommand in interface TelnetEventHandler
public void optionSubNegotiation(int option,
byte[] params)
throws java.io.IOException
TelnetEventHandlersendOptionSubNegotiation
optionSubNegotiation in interface TelnetEventHandlerjava.io.IOException
public boolean optionNegotiation(int option,
int request)
throws java.io.IOException
TelnetEventHandlerdoOption and willOption
optionNegotiation in interface TelnetEventHandlerjava.io.IOExceptionpublic void receiveData(byte b)
TelnetEventHandler
receiveData in interface TelnetEventHandlerprotected void sendTypedChar(int c)
sendTypedChar in class TerminalInputChaffc - typed characterprotected void sendFakeChar()
TerminalInputChaff
sendFakeChar in class TerminalInputChaffpublic void sendBytes(byte[] b)
sendBytes in interface TerminalInputListenerb - array of bytes representing characters to input
public void signalWindowChanged(int rows,
int cols,
int vpixels,
int hpixels)
signalWindowChanged in interface TerminalInputListenerrows - new number of rowscols - new number of columnsvpixels - number of verticial pixelshpixels - number of horizontal pixelspublic void sendBreak()
sendBreak in interface TerminalInputListenersendBreak in class TerminalInputChaff
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||