|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.mud.telnet.TelnetProtocolHandler
This is a telnet protocol handler. The handler needs implementations for several methods to handle the telnet options and to be able to read and write the buffer.
Maintainer: Marcus Meißner
Field Summary | |
static java.lang.String |
ID
contains the current revision id |
Constructor Summary | |
TelnetProtocolHandler()
Create a new telnet protocol handler. |
Method Summary | |
protected abstract java.lang.String |
getTerminalType()
Get the current terminal type for TTYPE telnet option. |
protected abstract java.awt.Dimension |
getWindowSize()
Get the current window size of the terminal for the NAWS telnet option. |
void |
inputfeed(byte[] b,
int len)
|
int |
negotiate(byte[] nbuf)
Handle telnet protocol negotiation. |
protected abstract void |
notifyEndOfRecord()
Generate an EOR (end of record) request. |
void |
reset()
Reset the protocol handler. |
void |
sendTelnetControl(byte code)
Send a Telnet Escape character (IAC ) |
void |
setCR(java.lang.String xcr)
|
void |
setCRLF(java.lang.String xcrlf)
|
protected abstract void |
setLocalEcho(boolean echo)
Set the local echo option of telnet. |
void |
startup()
Do not send any notifications at startup. |
void |
transpose(byte[] buf)
Transpose special telnet codes like 0xff or newlines to values that are compliant to the protocol. |
protected abstract void |
write(byte[] b)
Send data to the remote host. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ID
Constructor Detail |
public TelnetProtocolHandler()
Method Detail |
protected abstract java.lang.String getTerminalType()
protected abstract java.awt.Dimension getWindowSize()
protected abstract void setLocalEcho(boolean echo)
echo
- true for local echo, false for no local echoprotected abstract void notifyEndOfRecord()
protected abstract void write(byte[] b) throws java.io.IOException
b
- array of bytes to sendpublic void reset()
public void sendTelnetControl(byte code) throws java.io.IOException
)
public void startup() throws java.io.IOException
public void transpose(byte[] buf) throws java.io.IOException
buf
- the data buffer to be sentpublic void setCRLF(java.lang.String xcrlf)
public void setCR(java.lang.String xcr)
public int negotiate(byte[] nbuf) throws java.io.IOException
buf
- the byte buffer used for negotiationcount
- the amount of bytes in the bufferpublic void inputfeed(byte[] b, int len)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |