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
FieldsModifier and TypeFieldDescriptionstatic final intThe remote party sent aCOMMAND.static final intThe remote party sent a DO command.static final intThe remote party sent aDONTcommand.static final intThe remote party sent aWILLcommand.static final intThe remote party sent aWONTcommand. -
Method Summary
Modifier and TypeMethodDescriptionvoidreceivedNegotiation(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 aDONTcommand.- See Also:
-
RECEIVED_WILL
The remote party sent aWILLcommand.- See Also:
-
RECEIVED_WONT
The remote party sent aWONTcommand.- 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).
-