JMUDTelnetProtocolHandlerpublic abstract class TelnetProtocolHandler
extends java.lang.Object
Maintainer: Marcus Meissner
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
ID |
contains the current revision id
|
| Constructor | Description |
|---|---|
TelnetProtocolHandler() |
Create a new telnet protocol handler.
|
| Modifier and Type | Method | Description |
|---|---|---|
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) |
|
boolean |
isMCCP2() |
This method returns whether MCCP2 is currently enabled
|
boolean |
isMXP() |
|
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 |
setWindowSize(int columns,
int rows) |
Send the new Window Size (via NAWS)
|
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.
|
public static final java.lang.String ID
public TelnetProtocolHandler()
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 sendjava.io.IOExceptionpublic void reset()
public void sendTelnetControl(byte code)
throws java.io.IOException
)java.io.IOExceptionpublic void setWindowSize(int columns,
int rows)
throws java.io.IOException
java.io.IOExceptionpublic void startup()
throws java.io.IOException
java.io.IOExceptionpublic void transpose(byte[] buf)
throws java.io.IOException
buf - the data buffer to be sentjava.io.IOExceptionpublic void setCRLF(java.lang.String xcrlf)
public void setCR(java.lang.String xcr)
public int negotiate(byte[] nbuf)
throws java.io.IOException
nbuf - the byte buffer put out after negotiationjava.io.IOExceptionpublic void inputfeed(byte[] b,
int len)
public boolean isMCCP2()
public boolean isMXP()