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 SummaryFieldsModifier 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 SummaryModifier and TypeMethodDescriptionvoidreceivedNegotiation(int negotiation_code, int option_code) Callback method called when TelnetClient receives a command or option negotiation command
- 
Field Details- 
RECEIVED_DOThe remote party sent a DO command.- See Also:
 
- 
RECEIVED_DONTThe remote party sent aDONTcommand.- See Also:
 
- 
RECEIVED_WILLThe remote party sent aWILLcommand.- See Also:
 
- 
RECEIVED_WONTThe remote party sent aWONTcommand.- See Also:
 
- 
RECEIVED_COMMANDThe remote party sent aCOMMAND.- Since:
- 2.2
- See Also:
 
 
- 
- 
Method Details- 
receivedNegotiationCallback 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).
 
 
-