public interface NetClient
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFIX_FILE
FILE url
|
static java.lang.String |
PREFIX_FTP
FTP url
|
static java.lang.String |
PREFIX_S3
S3 url
|
static java.lang.String |
PREFIX_SFTP
SFTP url
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates the client, also used by pooling
|
boolean |
canConnect(java.lang.String url)
Checks that the client is able to connect
|
boolean |
changeDirectory(java.lang.String path,
boolean create)
Changes the working directory to the given directory
|
void |
destroy()
Destroys the client, also used by pooling
|
boolean |
exists(java.lang.String path)
Checks if the file specified by the given arguments physically exists
|
void |
fetch(java.lang.String path,
java.io.File target)
Fetches the file specified by the given arguments
|
java.lang.String |
getDirectory()
Gets the current working directory
|
java.lang.String |
getType()
The protocol that this client is for
|
java.lang.Object |
getUnderlyingConnectionObject()
Get the underlying connection object
|
void |
make(java.lang.String url)
Makes a new client, also used by pooling
|
void |
make(java.lang.String url,
java.lang.String SOCKSProxyURL,
java.lang.String keyPath,
int serverPort)
Makes a new client, also used by pooling
|
void |
remove(java.lang.String path)
Removes the physical file specified by the given arguments
|
void |
rename(java.lang.String from,
java.lang.String to)
Renames the physical file specified by the given arguments
|
java.lang.String[] |
retrieveFileList()
Gets the list of files in the path
|
void |
send(java.io.File rawFile,
java.lang.String path)
Sends to the file specified by the given arguments to the given location
|
ProgressListener |
setProgressListener(ProgressListener monitor)
Sets the progress listener to be used by the client for fetch operations.
|
boolean |
validate()
Validates a client, also used by pooling
|
static final java.lang.String PREFIX_FILE
static final java.lang.String PREFIX_FTP
static final java.lang.String PREFIX_SFTP
static final java.lang.String PREFIX_S3
@CheckReturnValue boolean exists(@Nonnull java.lang.String path) throws java.lang.Exception
path
- the pathjava.lang.Exception
- a serious problemvoid fetch(@Nonnull java.lang.String path, @Nonnull java.io.File target) throws java.lang.Exception
path
- the path of the filetarget
- the target filejava.lang.Exception
- a serious problemvoid remove(@Nonnull java.lang.String path) throws java.lang.Exception
path
- the file to removejava.lang.Exception
- a serious problemvoid rename(@Nonnull java.lang.String from, @Nonnull java.lang.String to) throws java.lang.Exception
from
- the current path of the fileto
- the new path of the filejava.lang.Exception
- a serious problemvoid send(@Nonnull java.io.File rawFile, @Nonnull java.lang.String path) throws java.lang.Exception
rawFile
- the file to sendpath
- the path to send the file tojava.lang.Exception
- a serious problem@CheckReturnValue boolean changeDirectory(@Nonnull java.lang.String path, boolean create) throws java.io.IOException
path
- the pathcreate
- should we create the directory if missing ?java.io.IOException
@CheckReturnValue @Nonnull java.lang.String[] retrieveFileList() throws java.lang.Exception
java.lang.Exception
- a serious problem@CheckReturnValue @Nonnull java.lang.String getDirectory() throws java.lang.Exception
java.lang.Exception
- a serious problem@CheckReturnValue @Nonnull java.lang.String getType()
@CheckReturnValue boolean canConnect(@Nonnull java.lang.String url)
url
- the URL to tryvoid activate()
void destroy()
void make(@Nonnull java.lang.String url) throws java.lang.Exception
url
- the client urljava.lang.Exception
- a serious problemvoid make(java.lang.String url, java.lang.String SOCKSProxyURL, java.lang.String keyPath, int serverPort) throws java.lang.Exception
url
- the client urlSOCKSProxyURL
- the SOCKSProxyURLkeyPath
- the keyPathserverPort
- the portjava.lang.Exception
- a serious problem@CheckReturnValue boolean validate()
@Nullable ProgressListener setProgressListener(@Nullable ProgressListener monitor)
monitor
- the progress listener to use@Nullable @CheckReturnValue java.lang.Object getUnderlyingConnectionObject()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.