Package org.apache.commons.net.telnet
Interface TelnetNotificationHandler
public interface TelnetNotificationHandler
The TelnetNotificationHandler interface can be used to handle notification of options negotiation commands received on a telnet session.
The user can implement this interface and register a TelnetNotificationHandler by using the registerNotificationHandler() of TelnetClient to be notified of option negotiation commands.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The remote party sent aCOMMAND
.static final int
The remote party sent a DO command.static final int
The remote party sent aDONT
command.static final int
The remote party sent aWILL
command.static final int
The remote party sent aWONT
command. -
Method Summary
Modifier and TypeMethodDescriptionvoid
receivedNegotiation
(int negotiation_code, int option_code) Callback method called when TelnetClient receives a command or option negotiation command
-
Field Details
-
RECEIVED_DO
The remote party sent a DO command.- See Also:
-
RECEIVED_DONT
The remote party sent aDONT
command.- See Also:
-
RECEIVED_WILL
The remote party sent aWILL
command.- See Also:
-
RECEIVED_WONT
The remote party sent aWONT
command.- See Also:
-
RECEIVED_COMMAND
The remote party sent aCOMMAND
.- Since:
- 2.2
- See Also:
-
-
Method Details
-
receivedNegotiation
Callback method called when TelnetClient receives a command or option negotiation command- Parameters:
negotiation_code
- - type of (negotiation) command received (RECEIVED_DO, RECEIVED_DONT, RECEIVED_WILL, RECEIVED_WONT, RECEIVED_COMMAND)option_code
- - code of the option negotiated, or the command code itself (e.g. NOP).
-