org.apache.commons.net.telnet.Telnet | +--org.apache.commons.net.telnet.TelnetClientKnown Direct Subclasses:
boolean |
Default TelnetClient constructor. |
TelnetClient(String termtype) |
void | Handles special connection requirements. |
void | addOptionHandler(TelnetOptionHandler opthand) Registers a new TelnetOptionHandler for this telnet client to use. |
void | deleteOptionHandler(int optcode) Unregisters a TelnetOptionHandler. |
void | Disconnects the telnet session, closing the input and output streams as well as the socket. |
InputStream | Returns the telnet connection input stream. |
boolean | getLocalOptionState(int option) Returns the state of the option on the local side. |
OutputStream | Returns the telnet connection output stream. |
boolean | Gets the status of the reader thread. |
boolean | getRemoteOptionState(int option) Returns the state of the option on the remote side. |
void | registerNotifHandler(TelnetNotificationHandler notifhand) Registers a notification handler to which will be sent notifications of received telnet option negotiation commands. |
void | registerSpyStream(OutputStream spystream) Registers an OutputStream for spying what's going on in the TelnetClient session. |
boolean | sendAYT(long timeout) Sends an Are You There sequence and waits for the result. |
void | setReaderThread(boolean flag) Sets the status of the reader thread. |
void | Stops spying this TelnetClient. |
void | Unregisters the current notification handler. |
protected boolean readerThread
public TelnetClient()
public TelnetClient(String termtype)
protected void _connectAction_()
- If an error occurs during connection setup.public void addOptionHandler(TelnetOptionHandler opthand)
InvalidTelnetOptionException - public void deleteOptionHandler(int optcode)
InvalidTelnetOptionException - public void disconnect()
public InputStream getInputStream()
public boolean getLocalOptionState(int option)
public OutputStream getOutputStream()
public boolean getReaderThread()
public boolean getRemoteOptionState(int option)
public void registerNotifHandler(TelnetNotificationHandler notifhand)
public void registerSpyStream(OutputStream spystream)
public boolean sendAYT(long timeout)
- - - public void setReaderThread(boolean flag)
public void stopSpyStream()
public void unregisterNotifHandler()