Class TelnetTask.AntTelnetClient
java.lang.Object
org.apache.commons.net.SocketClient
org.apache.commons.net.telnet.TelnetClient
org.apache.tools.ant.taskdefs.optional.net.TelnetTask.AntTelnetClient
- Enclosing class:
- TelnetTask
public class TelnetTask.AntTelnetClient
extends org.apache.commons.net.telnet.TelnetClient
This class handles the abstraction of the telnet protocol.
  Currently it is a wrapper around Jakarta
  Commons Net.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intFields inherited from class org.apache.commons.net.telnet.TelnetClientreaderThreadFields inherited from class org.apache.commons.net.SocketClient_defaultPort_, _hostname_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidsendString(String s, boolean echoString) Write this string to the telnet session.voidRead from the telnet session until the string we are waiting for is foundvoidwaitForString(String s, Integer timeout) Read from the telnet session until the string we are waiting for is found or the timeout has been reachedMethods inherited from class org.apache.commons.net.telnet.TelnetClient_connectAction_, addOptionHandler, deleteOptionHandler, disconnect, getInputStream, getLocalOptionState, getOutputStream, getReaderThread, getRemoteOptionState, registerInputListener, registerNotifHandler, registerSpyStream, sendAYT, sendCommand, sendSubnegotiation, setReaderThread, stopSpyStream, unregisterInputListener, unregisterNotifHandlerMethods inherited from class org.apache.commons.net.SocketClientaddProtocolCommandListener, applySocketAttributes, connect, connect, connect, connect, connect, connect, createCommandSupport, fireCommandSent, fireReplyReceived, getCharset, getCharsetName, getCommandSupport, getConnectTimeout, getDefaultPort, getDefaultTimeout, getKeepAlive, getLocalAddress, getLocalPort, getProxy, getReceiveBufferSize, getRemoteAddress, getRemotePort, getSendBufferSize, getServerSocketFactory, getSoLinger, getSoTimeout, getTcpNoDelay, isAvailable, isConnected, removeProtocolCommandListener, setCharset, setConnectTimeout, setDefaultPort, setDefaultTimeout, setKeepAlive, setProxy, setReceiveBufferSize, setSendBufferSize, setServerSocketFactory, setSocketFactory, setSoLinger, setSoTimeout, setTcpNoDelay, verifyRemote
- 
Field Details- 
TERMINAL_TYPEprotected static final int TERMINAL_TYPE- See Also:
 
- 
TERMINAL_TYPE_SENDprotected static final int TERMINAL_TYPE_SEND- See Also:
 
- 
TERMINAL_TYPE_ISprotected static final int TERMINAL_TYPE_IS- See Also:
 
 
- 
- 
Constructor Details- 
AntTelnetClientpublic AntTelnetClient()
 
- 
- 
Method Details- 
waitForStringRead from the telnet session until the string we are waiting for is found- Parameters:
- s- The string to wait on
 
- 
waitForStringRead from the telnet session until the string we are waiting for is found or the timeout has been reached- Parameters:
- s- The string to wait on
- timeout- The maximum number of seconds to wait
 
- 
sendStringWrite this string to the telnet session.- Parameters:
- s- the string to write
- echoString- if true log the string sent
 
 
-