Class TelnetClientHandler
java.lang.Object
ecmwf.common.telnet.TelnetClientHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
The Constant TELOPT_BINARY.static final byte
The Constant TELOPT_ECHO.static final byte
The Constant TELOPT_EOR.static final byte
The Constant TELOPT_NAWS.static final byte
The Constant TELOPT_SGA.static final byte
The Constant TELOPT_TTYPE. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Gets the terminal type.protected abstract TelnetDimension
Gets the window size.void
inputfeed
(byte[] b, int len) Inputfeed.int
negotiate
(byte[] nbuf) Negotiate.protected abstract void
Notify end of record.void
reset()
Reset.void
sendDisplayLocation
(String display) Sends the display location.void
Sends the env.void
sendOption
(char option, boolean state) Sends the option.void
sendOptionRequest
(byte option, boolean state) Sends the option request.void
sendTelnetControl
(byte code) Sends the telnet control.void
Sets the cr.void
Sets the crlf.protected abstract void
setLocalEcho
(boolean echo) Sets the local echo.void
startup()
Startup.void
subNegotiation
(char option, char[] params) Sub negotiation.void
transpose
(byte[] buf) Transpose.protected abstract void
write
(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.
-