| java.lang.Object org.apache.ivy.plugins.repository.AbstractRepository org.apache.ivy.plugins.repository.vsftp.VsftpRepository
VsftpRepository | public class VsftpRepository extends AbstractRepository (Code) | | Repository using SecureCRT vsftp command line program to access an sftp repository This is
especially useful to leverage the gssapi authentication supported by SecureCRT. In caseswhere
usual sftp is enough, prefer the 100% java solution of sftp repository. This requires SecureCRT
to be in the PATH. Tested with SecureCRT 5.0.5
|
Method Summary | |
public synchronized void | disconnect() | protected synchronized void | ensureConnectionOpened() | public void | get(String source, File destination) | public String | getAuthentication() | protected String | getConnectionCommand() | protected Pattern | getExpectedDownloadMessage(String source, File to) | protected Pattern | getExpectedRemoveMessage(String destination) | protected Pattern | getExpectedUploadMessage(File source, String to) | public String | getHost() | protected Resource | getInitResource(String source) | public long | getReadTimeout() | public Resource | getResource(String source) | protected String | getSingleCommand(String command) | public String | getUsername() | public List | list(String parent) | protected Resource | lslToResource(String file, String responseLine) | public void | put(File source, String destination, boolean overwrite) | protected String | readResponse(boolean sendErrorAsResponse) | protected synchronized String | readResponse(boolean sendErrorAsResponse, long timeout) | protected String | sendCommand(String command) | protected void | sendCommand(String command, Pattern expectedResponse) | protected void | sendCommand(String command, Pattern expectedResponse, long timeout) The behaviour of vsftp with some commands is to log the resulting message on the error
stream, even if everything is ok. | protected String | sendCommand(String command, boolean sendErrorAsResponse) | protected String | sendCommand(String command, boolean sendErrorAsResponse, boolean single) | protected String | sendCommand(String command, boolean sendErrorAsResponse, long timeout) | protected String | sendCommand(String command, boolean sendErrorAsResponse, boolean single, long timeout) | public void | setAuthentication(String authentication) | public void | setHost(String host) | public void | setReadTimeout(long readTimeout) | public void | setReuseConnection(long time) Sets the reuse connection time. | public void | setUsername(String username) | public String | toString() |
disconnect | public synchronized void disconnect()(Code) | | |
ensureConnectionOpened | protected synchronized void ensureConnectionOpened() throws IOException(Code) | | |
getConnectionCommand | protected String getConnectionCommand()(Code) | | |
getReadTimeout | public long getReadTimeout()(Code) | | |
lslToResource | protected Resource lslToResource(String file, String responseLine)(Code) | | Parses a ls -l line and transforms it in a resource
Parameters: file - Parameters: responseLine - |
readResponse | protected synchronized String readResponse(boolean sendErrorAsResponse, long timeout) throws IOException(Code) | | |
sendCommand | protected void sendCommand(String command, Pattern expectedResponse, long timeout) throws IOException(Code) | | The behaviour of vsftp with some commands is to log the resulting message on the error
stream, even if everything is ok. So it's quite difficult if there was an error or not. Hence
we compare the response with the expected message and deal with it. The problem is that this
is very specific to the version of vsftp used for the test, That's why expected messages are
obtained using overridable protected methods.
|
setAuthentication | public void setAuthentication(String authentication)(Code) | | |
setReadTimeout | public void setReadTimeout(long readTimeout)(Code) | | |
setReuseConnection | public void setReuseConnection(long time)(Code) | | Sets the reuse connection time. The same connection will be reused if the time here does not
last between two commands. O indicates that the connection should never be reused
Parameters: time - |
|
|