|
SSH Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.telnet.TelnetAdapter
public class TelnetAdapter
Implements methods for capturing events sourced from Telnet class. Typicaly your application will implement this interface to capture the following events :
TelnetConnectedEvent
TelnetDisconnectedEvent
DoOptionEvent
DontOptionEvent
WillOptionEvent
WontOptionEvent
DoSubOptionEvent
TelnetDataReceivedEvent
In addition to extending this class your application should register
itself as an EventListener which may look somewhat like this:
public class Application ... extends TelnetAdapter { ... public ... initMethod(...) { Telnet telnet = new Telnet("myserver.com"); telnet.addTelnetListener(this); } ... }
Constructor Summary | |
---|---|
TelnetAdapter()
|
Method Summary | |
---|---|
void |
connected(TelnetConnectedEvent event)
Invoked when Telnet connection is established. |
void |
dataReceived(TelnetDataReceivedEvent event)
Invoked when data is received from Telnet server. |
void |
disconnected(TelnetDisconnectedEvent event)
Invoked when Telnet connection is released. |
void |
dontOption(DontOptionEvent event)
Invoked when a DONT OPTION (refuse client request to use option) command is received from the Telnet server. |
void |
doOption(DoOptionEvent event)
Invoked when a DO OPTION (request client to use option) command is received from the Telnet server. |
void |
doSubOption(DoSubOptionEvent event)
Invoked when SB OPTION (subnegotiation) command is received from Telnet server, typically after accepting a WILL OPTION (offer client to use option) command from Telnet server. |
void |
willOption(WillOptionEvent event)
Invoked when a WILL OPTION (offer client to use option) command is received from the Telnet server. |
void |
wontOption(WontOptionEvent event)
Invoked when a WONT OPTION (refuse clients offer to use option) command is received from the Telnet server. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TelnetAdapter()
Method Detail |
---|
public void connected(TelnetConnectedEvent event)
connected
in interface TelnetListener
event
- a TelnetConnectedEventTelnetConnectedEvent
,
Telnet.connect()
public void disconnected(TelnetDisconnectedEvent event)
Telnet#disconnect
method
disconnected
in interface TelnetListener
event
- a TelnetDisconnectedEventTelnetDisconnectedEvent
,
Telnet.disconnect()
public void doOption(DoOptionEvent event)
doOption
in interface TelnetListener
event
- a DoOptionEvent
DoOptionEvent
,
TelnetOption
,
Telnet.sendDontOption(com.jscape.inet.telnet.TelnetOption)
,
Telnet.sendWillOption(com.jscape.inet.telnet.TelnetOption)
public void dontOption(DontOptionEvent event)
dontOption
in interface TelnetListener
event
- a DontOptionEvent
DontOptionEvent
,
TelnetOption
public void willOption(WillOptionEvent event)
willOption
in interface TelnetListener
event
- a WillOptionEvent
WillOptionEvent
,
TelnetOption
,
Telnet.sendDoOption(com.jscape.inet.telnet.TelnetOption)
,
Telnet.sendDontOption(com.jscape.inet.telnet.TelnetOption)
public void wontOption(WontOptionEvent event)
wontOption
in interface TelnetListener
event
- a WontOptionEvent
WontOptionEvent
,
TelnetOption
public void doSubOption(DoSubOptionEvent event)
doSubOption
in interface TelnetListener
event
- a DoSubOptionEventDoSubOptionEvent
,
Telnet.sendOptionSubnegotiation(com.jscape.inet.telnet.TelnetOption)
public void dataReceived(TelnetDataReceivedEvent event)
dataReceived
in interface TelnetListener
event
- a TelnetDataReceivedEvent
TelnetDataReceivedEvent
|
SSH Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |