Class RExecTask.AntRExecClient
java.lang.Object
org.apache.commons.net.SocketClient
org.apache.commons.net.bsd.RExecClient
org.apache.tools.ant.taskdefs.optional.net.RExecTask.AntRExecClient
- Enclosing class:
- RExecTask
public class RExecTask.AntRExecClient
extends org.apache.commons.net.bsd.RExecClient
This class handles the abstraction of the rexec protocol.
Currently it is a wrapper around Jakarta
Commons Net.
-
Field Summary
Fields inherited from class org.apache.commons.net.bsd.RExecClient
_errorStream_, DEFAULT_PORT, NULL_CHARFields inherited from class org.apache.commons.net.SocketClient
_defaultPort_, _hostname_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsendString(String s, boolean echoString) Write this string to the rexec session.voidwaitForEOF(Integer timeout) Read from the rexec session until the EOF is found or the timeout has been reachedvoidRead from the rexec session until the string we are waiting for is foundvoidwaitForString(String s, Integer timeout) Read from the rexec session until the string we are waiting for is found or the timeout has been reachedMethods inherited from class org.apache.commons.net.bsd.RExecClient
disconnect, getErrorStream, getInputStream, getOutputStream, isRemoteVerificationEnabled, rexec, rexec, setRemoteVerificationEnabledMethods inherited from class org.apache.commons.net.SocketClient
_connectAction_, addProtocolCommandListener, 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
-
Constructor Details
-
AntRExecClient
public AntRExecClient()
-
-
Method Details
-
waitForString
Read from the rexec session until the string we are waiting for is found- Parameters:
s- The string to wait on
-
waitForString
Read from the rexec session until the string we are waiting for is found or the timeout has been reached- Parameters:
s- The string to wait ontimeout- The maximum number of seconds to wait
-
sendString
Write this string to the rexec session.- Parameters:
s- the string to writeechoString- if true log the string sent
-
waitForEOF
Read from the rexec session until the EOF is found or the timeout has been reached- Parameters:
timeout- The maximum number of seconds to wait
-