|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Wagon
Field Summary | |
---|---|
static int |
DEFAULT_CONNECTION_TIMEOUT
default 60s approximately 1 minute |
static int |
DEFAULT_READ_TIMEOUT
default 1800s approximately 30 minutes |
static String |
ROLE
|
Method Summary | |
---|---|
void |
addSessionListener(SessionListener listener)
|
void |
addTransferListener(TransferListener listener)
|
void |
connect(Repository source)
Initiate the connection to the repository. |
void |
connect(Repository source,
AuthenticationInfo authenticationInfo)
Initiate the connection to the repository. |
void |
connect(Repository source,
AuthenticationInfo authenticationInfo,
ProxyInfo proxyInfo)
Initiate the connection to the repository. |
void |
connect(Repository source,
AuthenticationInfo authenticationInfo,
ProxyInfoProvider proxyInfoProvider)
Initiate the connection to the repository. |
void |
connect(Repository source,
ProxyInfo proxyInfo)
Initiate the connection to the repository. |
void |
connect(Repository source,
ProxyInfoProvider proxyInfoProvider)
Initiate the connection to the repository. |
void |
disconnect()
Disconnect from the repository. |
void |
get(String resourceName,
File destination)
Downloads specified resource from the repository to given file. |
List<String> |
getFileList(String destinationDirectory)
Returns a List of strings naming the files and directories in the directory denoted by
this abstract pathname. |
boolean |
getIfNewer(String resourceName,
File destination,
long timestamp)
Downloads specified resource from the repository if it was modified since specified date. |
int |
getReadTimeout()
Get the read timeout limit in milliseconds |
Repository |
getRepository()
|
int |
getTimeout()
Get the connection timeout limit in milliseconds |
boolean |
hasSessionListener(SessionListener listener)
|
boolean |
hasTransferListener(TransferListener listener)
|
boolean |
isInteractive()
|
void |
openConnection()
Deprecated. connect using the connect(org.apache.maven.wagon.repository.Repository) or related methods
- this is an internal method |
void |
put(File source,
String destination)
Copy a file from local system to remote |
void |
putDirectory(File sourceDirectory,
String destinationDirectory)
Copy a directory from local system to remote |
void |
removeSessionListener(SessionListener listener)
|
void |
removeTransferListener(TransferListener listener)
|
boolean |
resourceExists(String resourceName)
Check if a remote resource exists |
void |
setInteractive(boolean interactive)
|
void |
setReadTimeout(int timeoutValue)
Set the read timeout limit in milliseconds |
void |
setTimeout(int timeoutValue)
Set the connection timeout limit in milliseconds |
boolean |
supportsDirectoryCopy()
Flag indicating if this wagon supports directory copy operations. |
Field Detail |
---|
static final String ROLE
static final int DEFAULT_CONNECTION_TIMEOUT
static final int DEFAULT_READ_TIMEOUT
Method Detail |
---|
void get(String resourceName, File destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
resourceName
- destination
-
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
boolean getIfNewer(String resourceName, File destination, long timestamp) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
resourceName
- destination
- timestamp
-
true
if newer resource has been downloaded, false
if resource
in the repository is older or has the same age.
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
void put(File source, String destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
source
- the local filedestination
- the remote destination
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
void putDirectory(File sourceDirectory, String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
sourceDirectory
- the local directorydestinationDirectory
- the remote destination
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
boolean resourceExists(String resourceName) throws TransferFailedException, AuthorizationException
resourceName
-
TransferFailedException
- if there's an error trying to access the remote side
AuthorizationException
- if not authorized to verify the existence of the resourceList<String> getFileList(String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
List
of strings naming the files and directories in the directory denoted by
this abstract pathname.
If this abstract pathname does not denote a directory, or does not exist, then this method throws
ResourceDoesNotExistException
.
Otherwise a List
of strings is returned, one for each file or directory in the directory.
Names denoting the directory itself and the directory's parent directory are not included in
the result. Each string is a file name rather than a complete path.
There is no guarantee that the name strings in the resulting list will appear in any specific
order; they are not, in particular, guaranteed to appear in alphabetical order.
destinationDirectory
- directory to list contents of
List
of strings naming the files and directories in the directory denoted by
this abstract pathname. The List
will be empty if the directory is empty.
TransferFailedException
- if there's an error trying to access the remote side
ResourceDoesNotExistException
- if destinationDirectory does not exist or is not a directory
AuthorizationException
- if not authorized to list the contents of the directoryboolean supportsDirectoryCopy()
Repository getRepository()
void connect(Repository source) throws ConnectionException, AuthenticationException
source
- the repository to connect to
ConnectionException
- if there is a problem connecting
AuthenticationException
- if the credentials for connecting are not sufficientvoid connect(Repository source, ProxyInfo proxyInfo) throws ConnectionException, AuthenticationException
source
- the repository to connect to
ConnectionException
- if there is a problem connecting
AuthenticationException
- if the credentials for connecting are not sufficientvoid connect(Repository source, ProxyInfoProvider proxyInfoProvider) throws ConnectionException, AuthenticationException
source
- the repository to connect toproxyInfoProvider
- the provider to obtain a network proxy to use to connect to the remote repository
ConnectionException
- if there is a problem connecting
AuthenticationException
- if the credentials for connecting are not sufficientvoid connect(Repository source, AuthenticationInfo authenticationInfo) throws ConnectionException, AuthenticationException
source
- the repository to connect toauthenticationInfo
- authentication credentials for connecting
ConnectionException
- if there is a problem connecting
AuthenticationException
- if the credentials for connecting are not sufficientvoid connect(Repository source, AuthenticationInfo authenticationInfo, ProxyInfo proxyInfo) throws ConnectionException, AuthenticationException
source
- the repository to connect toauthenticationInfo
- authentication credentials for connectingproxyInfo
- the network proxy to use to connect to the remote repository
ConnectionException
- if there is a problem connecting
AuthenticationException
- if the credentials for connecting are not sufficientvoid connect(Repository source, AuthenticationInfo authenticationInfo, ProxyInfoProvider proxyInfoProvider) throws ConnectionException, AuthenticationException
source
- the repository to connect toauthenticationInfo
- authentication credentials for connectingproxyInfoProvider
- the provider to obtain a network proxy to use to connect to the remote repository
ConnectionException
- if there is a problem connecting
AuthenticationException
- if the credentials for connecting are not sufficientvoid openConnection() throws ConnectionException, AuthenticationException
connect(org.apache.maven.wagon.repository.Repository)
or related methods
- this is an internal method
ConnectionException
- if there is a problem connecting
AuthenticationException
- if ther credentials for connecting are not sufficientvoid disconnect() throws ConnectionException
ConnectionException
- if there is a problem disconnectingvoid setTimeout(int timeoutValue)
int getTimeout()
void setReadTimeout(int timeoutValue)
int getReadTimeout()
void addSessionListener(SessionListener listener)
void removeSessionListener(SessionListener listener)
boolean hasSessionListener(SessionListener listener)
void addTransferListener(TransferListener listener)
void removeTransferListener(TransferListener listener)
boolean hasTransferListener(TransferListener listener)
boolean isInteractive()
void setInteractive(boolean interactive)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |