|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sshtools.j2ssh.SshClient
org.ow2.petals.bc.sftp.connection.WrappedSftpClient
public class WrappedSftpClient
This class handle a connection to the SFTP server with the specified configuration parameter
| Field Summary |
|---|
| Fields inherited from class com.sshtools.j2ssh.SshClient |
|---|
activeChannelListener, activeChannels, authentication, authenticationState, connection, eventHandler, forwarding, socketTimeout, transport, useDefaultForwarding |
| Constructor Summary | |
|---|---|
WrappedSftpClient(SFTPConnectionInfo connectionConfiguration,
java.util.logging.Logger logger)
|
|
| Method Summary | |
|---|---|
void |
configure()
Change the path on the remote server. |
void |
connectAndLog()
Open a ssh connection on the remote server and open a sftpclient. |
void |
del(java.lang.String filePattern)
|
org.w3c.dom.Document |
get(java.lang.String filePattern)
Retrieve the file given by its filename on the SFTP server. |
javax.activation.DataHandler |
getAsAttachment(java.lang.String filePattern)
Retrieve the file given by its filename on the SFTP server. |
SFTPConnectionInfo |
getInfo()
|
java.util.List<java.lang.String> |
list()
List the content of the directory specified in the SFTPConfigurationInfo used to build an instance of this object. |
java.util.Map<java.lang.String,javax.activation.DataHandler> |
mGet(java.util.List<java.lang.String> fileFilterList)
Retrieve the specified files from the SSH server. |
boolean |
mput(java.util.Map<java.lang.String,javax.activation.DataHandler> attachments)
Sends a set of files to a SFTP server. |
boolean |
putString(java.lang.String fileName,
java.lang.String content)
Create a new file - using the given filename - on the SFTP server, with the given content. |
| Methods inherited from class com.sshtools.j2ssh.SshClient |
|---|
acceptsKey, addEventHandler, allowChannelOpen, authenticate, connect, connect, connect, connect, connect, connect, denyChannelOpen, disconnect, getActiveChannelCount, getActiveChannels, getActiveSession, getActiveSftpClient, getAuthenticationBanner, getAvailableAuthMethods, getConnectionProperties, getConnectionState, getForwardingClient, getIncomingByteCount, getOutgoingByteCount, getRemoteEOL, getRemoteEOLString, getServerHostKey, getServerId, hasActiveSession, hasActiveSftpClient, isActiveChannel, isAuthenticated, isConnected, openChannel, openScpClient, openScpClient, openSessionChannel, openSessionChannel, openSftpChannel, openSftpChannel, openSftpClient, openSftpClient, sendGlobalRequest, setKexTimeout, setKexTransferLimit, setSendIgnore, setSocketTimeout, setUseDefaultForwarding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WrappedSftpClient(SFTPConnectionInfo connectionConfiguration,
java.util.logging.Logger logger)
| Method Detail |
|---|
public void configure()
throws java.io.IOException
java.io.IOException
public void connectAndLog()
throws java.io.IOException
SshAuthenticationException
java.io.IOException
public void del(java.lang.String filePattern)
throws java.io.IOException
filePattern -
SshAuthenticationException
SftpClientPoolException
java.io.IOException
public org.w3c.dom.Document get(java.lang.String filePattern)
throws java.io.IOException
filePattern - name of the file to get from the SFTP server
SftpClientPoolException - if a problem on the client pool occur while performing this
operation
SshAuthenticationException - if the given authentication information are not valid
java.io.IOException - if any IO problem occur while sending file or connecting to
server
public javax.activation.DataHandler getAsAttachment(java.lang.String filePattern)
throws java.io.IOException
filePattern - name of the file to get from the SFTP server
SftpClientPoolException - if a problem on the client pool occur while performing this
operation
SshAuthenticationException - if the given authentication information are not valid
java.io.IOException - if any IO problem occur while sending file or connecting to
serverpublic SFTPConnectionInfo getInfo()
public java.util.List<java.lang.String> list()
throws java.io.IOException
java.io.IOException - if any IO problem occur while sending file or connecting to
server
public java.util.Map<java.lang.String,javax.activation.DataHandler> mGet(java.util.List<java.lang.String> fileFilterList)
throws java.io.IOException
fileFilterList - the list of files to get from the SFTP server
SftpClientPoolException - if a problem on the client pool occur while performing this
operation
SshAuthenticationException - if the given authentication information are not valid
java.io.IOException - if any IO problem occur while sending file or connecting to
server
public boolean mput(java.util.Map<java.lang.String,javax.activation.DataHandler> attachments)
throws java.io.IOException
attachments - the file to be send
SftpClientPoolException - if a problem on the client pool occur while performing this
operation
SshAuthenticationException - if the given authentication information are not valid
java.io.IOException - if any IO problem occur while sending file or connecting to
server
public boolean putString(java.lang.String fileName,
java.lang.String content)
throws java.io.IOException
fileName - name of the file to write onto the SFTP servercontent - file content, as String
SftpClientPoolException - if a problem on the client pool occur while performing this
operation
SshAuthenticationException - if the given authentication information are not valid
java.io.IOException - if any IO problem occur while sending file or connecting to
server
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||