Class TelnetClientHandler
java.lang.Object
ecmwf.common.telnet.TelnetClientHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteThe Constant TELOPT_BINARY.static final byteThe Constant TELOPT_ECHO.static final byteThe Constant TELOPT_EOR.static final byteThe Constant TELOPT_NAWS.static final byteThe Constant TELOPT_SGA.static final byteThe Constant TELOPT_TTYPE. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringGets the terminal type.protected abstract TelnetDimensionGets the window size.voidinputfeed(byte[] b, int len) Inputfeed.intnegotiate(byte[] nbuf) Negotiate.protected abstract voidNotify end of record.voidreset()Reset.voidsendDisplayLocation(String display) Sends the display location.voidSends the env.voidsendOption(char option, boolean state) Sends the option.voidsendOptionRequest(byte option, boolean state) Sends the option request.voidsendTelnetControl(byte code) Sends the telnet control.voidSets the cr.voidSets the crlf.protected abstract voidsetLocalEcho(boolean echo) Sets the local echo.voidstartup()Startup.voidsubNegotiation(char option, char[] params) Sub negotiation.voidtranspose(byte[] buf) Transpose.protected abstract voidwrite(byte[] b) Write.
-
Field Details
-
TELOPT_BINARY
public static final byte TELOPT_BINARYThe Constant TELOPT_BINARY.- See Also:
-
TELOPT_ECHO
public static final byte TELOPT_ECHOThe Constant TELOPT_ECHO.- See Also:
-
TELOPT_SGA
public static final byte TELOPT_SGAThe Constant TELOPT_SGA.- See Also:
-
TELOPT_EOR
public static final byte TELOPT_EORThe Constant TELOPT_EOR.- See Also:
-
TELOPT_NAWS
public static final byte TELOPT_NAWSThe Constant TELOPT_NAWS.- See Also:
-
TELOPT_TTYPE
public static final byte TELOPT_TTYPEThe Constant TELOPT_TTYPE.- See Also:
-
-
Constructor Details
-
TelnetClientHandler
public TelnetClientHandler()Instantiates a new telnet client handler.
-
-
Method Details
-
getTerminalType
-
getWindowSize
-
setLocalEcho
protected abstract void setLocalEcho(boolean echo) Sets the local echo.- Parameters:
echo- the new local echo
-
notifyEndOfRecord
protected abstract void notifyEndOfRecord()Notify end of record. -
write
Write.- Parameters:
b- the b- Throws:
IOException- Signals that an I/O exception has occurred.
-
reset
public void reset()Reset. -
sendTelnetControl
Sends the telnet control.- Parameters:
code- the code- Throws:
IOException- Signals that an I/O exception has occurred.
-
startup
Startup.- Throws:
IOException- Signals that an I/O exception has occurred.
-
transpose
Transpose.- Parameters:
buf- the buf- Throws:
IOException- Signals that an I/O exception has occurred.
-
setCRLF
-
setCR
-
negotiate
Negotiate.- Parameters:
nbuf- the nbuf- Returns:
- the int
- Throws:
IOException- Signals that an I/O exception has occurred.
-
inputfeed
public void inputfeed(byte[] b, int len) Inputfeed.- Parameters:
b- the blen- the len
-
sendDisplayLocation
Sends the display location.- Parameters:
display- the display- Throws:
IOException- Signals that an I/O exception has occurred.
-
sendEnv
Sends the env.- Parameters:
name- the namevalue- the value- Throws:
IOException- Signals that an I/O exception has occurred.
-
sendOption
Sends the option.- Parameters:
option- the optionstate- the state- Throws:
IOException- Signals that an I/O exception has occurred.
-
subNegotiation
Sub negotiation.- Parameters:
option- the optionparams- the params- Throws:
IOException- Signals that an I/O exception has occurred.
-
sendOptionRequest
Sends the option request.- Parameters:
option- the optionstate- the state- Throws:
IOException- Signals that an I/O exception has occurred.
-