DEFAULT_PORT
(package private) static final int DEFAULT_PORT
- 23
TERMINAL_TYPE
protected static final int TERMINAL_TYPE
Terminal type option
- 24
TERMINAL_TYPE_IS
protected static final int TERMINAL_TYPE_IS
Is (for subnegotiation)
- 0
TERMINAL_TYPE_SEND
protected static final int TERMINAL_TYPE_SEND
Send (for subnegotiation)
- 1
_COMMAND_AYT
(package private) static final byte[] _COMMAND_AYT
AYT sequence
_COMMAND_DO
(package private) static final byte[] _COMMAND_DO
_COMMAND_DONT
(package private) static final byte[] _COMMAND_DONT
_COMMAND_IS
(package private) static final byte[] _COMMAND_IS
Is sequence (for subnegotiation)
_COMMAND_SB
(package private) static final byte[] _COMMAND_SB
_COMMAND_SE
(package private) static final byte[] _COMMAND_SE
_COMMAND_WILL
(package private) static final byte[] _COMMAND_WILL
_COMMAND_WONT
(package private) static final byte[] _COMMAND_WONT
_DO_MASK
(package private) static final int _DO_MASK
- 2
_REQUESTED_DO_MASK
(package private) static final int _REQUESTED_DO_MASK
- 8
_REQUESTED_WILL_MASK
(package private) static final int _REQUESTED_WILL_MASK
- 4
_WILL_MASK
(package private) static final int _WILL_MASK
- 1
_doResponse
(package private) int[] _doResponse
_options
(package private) int[] _options
_willResponse
(package private) int[] _willResponse
aytFlag
private boolean aytFlag
flag for AYT
aytMonitor
private Object aytMonitor
monitor to wait for AYT
debug
(package private) static final boolean debug
- false
debugoptions
(package private) static final boolean debugoptions
- false
spyStream
private OutputStream spyStream
The stream on which to spy
terminalType
private String terminalType
Terminal type
_connectAction_
protected void _connectAction_()
throws IOException
- _connectAction_ in interface SocketClient
_processAYTResponse
(package private) final void _processAYTResponse()
Processes the response of an AYT
_processDo
(package private) void _processDo(int option)
throws IOException
option
- - option code to be set.
_processDont
(package private) void _processDont(int option)
throws IOException
Processes a DONT request.
option
- - option code to be set.
_processSuboption
(package private) void _processSuboption(suboption[] ,
int suboptionLength)
throws IOException
Processes a suboption negotiation.
suboptionLength
- - length of data received
_processWill
(package private) void _processWill(int option)
throws IOException
Processes a WILL request.
option
- - option code to be set.
_processWont
(package private) void _processWont(int option)
throws IOException
Processes a WONT request.
option
- - option code to be set.
_registerSpyStream
(package private) void _registerSpyStream(OutputStream spystream)
Registers an OutputStream for spying what's going on in
the Telnet session.
spystream
- - OutputStream on which session activity
will be echoed.
_requestDo
(package private) final void _requestDo(int option)
throws IOException
option
- - Option code.
_requestDont
(package private) final void _requestDont(int option)
throws IOException
option
- - Option code.
_requestWill
(package private) final void _requestWill(int option)
throws IOException
option
- - Option code.
_requestWont
(package private) final void _requestWont(int option)
throws IOException
option
- - Option code.
_requestedDo
(package private) boolean _requestedDo(int option)
Looks for the state of the option.
option
- - option code to be looked up.
- returns true if a do has been reuqested
_requestedDont
(package private) boolean _requestedDont(int option)
Looks for the state of the option.
option
- - option code to be looked up.
- returns true if a dont has been reuqested
_requestedWill
(package private) boolean _requestedWill(int option)
Looks for the state of the option.
option
- - option code to be looked up.
- returns true if a will has been reuqested
_requestedWont
(package private) boolean _requestedWont(int option)
Looks for the state of the option.
option
- - option code to be looked up.
- returns true if a wont has been reuqested
_sendAYT
(package private) final boolean _sendAYT(long timeout)
throws IOException,
IllegalArgumentException,
InterruptedException
Sends an Are You There sequence and waits for the result.
timeout
- - Time to wait for a response (millis.)
- true if AYT received a response, false otherwise
_sendByte
(package private) final void _sendByte(int b)
throws IOException
b
- - byte to send
_sendDo
(package private) final void _sendDo(int option)
throws IOException
option
- - Option code.
_sendDont
(package private) final void _sendDont(int option)
throws IOException
option
- - Option code.
_sendSubnegotiation
(package private) final void _sendSubnegotiation(subn[] )
throws IOException
Manages subnegotiation for Terminal Type.
_sendTerminalType
(package private) final void _sendTerminalType()
throws IOException
Sends terminal type information.
_sendWill
(package private) final void _sendWill(int option)
throws IOException
option
- - Option code.
_sendWont
(package private) final void _sendWont(int option)
throws IOException
option
- - Option code.
_setDo
(package private) void _setDo(int option)
Sets the state of the option.
option
- - option code to be set.
_setDont
(package private) void _setDont(int option)
Sets the state of the option.
option
- - option code to be set.
_setWantDo
(package private) void _setWantDo(int option)
Sets the state of the option.
option
- - option code to be set.
_setWantDont
(package private) void _setWantDont(int option)
Sets the state of the option.
option
- - option code to be set.
_setWantWill
(package private) void _setWantWill(int option)
Sets the state of the option.
option
- - option code to be set.
_setWantWont
(package private) void _setWantWont(int option)
Sets the state of the option.
option
- - option code to be set.
_setWill
(package private) void _setWill(int option)
Sets the state of the option.
option
- - option code to be set.
_setWont
(package private) void _setWont(int option)
Sets the state of the option.
option
- - option code to be set.
_spyRead
(package private) void _spyRead(int ch)
Sends a read char on the spy stream.
ch
- - character read from the session
_spyWrite
(package private) void _spyWrite(int ch)
Sends a written char on the spy stream.
ch
- - character written to the session
_stateIsDo
(package private) boolean _stateIsDo(int option)
Looks for the state of the option.
option
- - option code to be looked up.
- returns true if a do has been acknowledged
_stateIsDont
(package private) boolean _stateIsDont(int option)
Looks for the state of the option.
option
- - option code to be looked up.
- returns true if a dont has been acknowledged
_stateIsWill
(package private) boolean _stateIsWill(int option)
Looks for the state of the option.
option
- - option code to be looked up.
- returns true if a will has been acknowledged
_stateIsWont
(package private) boolean _stateIsWont(int option)
Looks for the state of the option.
option
- - option code to be looked up.
- returns true if a wont has been acknowledged
_stopSpyStream
(package private) void _stopSpyStream()
Stops spying this Telnet.
registerNotifHandler
public void registerNotifHandler(TelnetNotificationHandler notifhand)
Registers a notification handler to which will be sent
notifications of received telnet option negotiation commands.
notifhand
- - TelnetNotificationHandler to be registered
unregisterNotifHandler
public void unregisterNotifHandler()
Unregisters the current notification handler.