org.apache.maven.wagon.providers.http

Class HttpWagon

public class HttpWagon extends AbstractWagon

Version: $Id: HttpWagon.java 485099 2006-12-10 00:20:09Z joakime $

Author: Michal Maczka

Field Summary
HttpClientclient
static intDEFAULT_NUMBER_OF_ATTEMPTS
static TimeZoneGMT_TIME_ZONE
intnumberOfAttempts
static intSC_NULL
Method Summary
voidcloseConnection()
voidget(String resourceName, File destination)
booleanget(String resourceName, File destination, long timestamp)
ListgetFileList(String destinationDirectory)
booleangetIfNewer(String resourceName, File destination, long timestamp)
intgetNumberOfAttempts()
voidopenConnection()
voidput(File source, String resourceName)
booleanresourceExists(String resourceName)
voidsetNumberOfAttempts(int numberOfAttempts)

Field Detail

client

private HttpClient client

DEFAULT_NUMBER_OF_ATTEMPTS

private static final int DEFAULT_NUMBER_OF_ATTEMPTS

GMT_TIME_ZONE

private static final TimeZone GMT_TIME_ZONE

numberOfAttempts

private int numberOfAttempts

SC_NULL

private static final int SC_NULL

Method Detail

closeConnection

public void closeConnection()

get

public void get(String resourceName, File destination)

get

public boolean get(String resourceName, File destination, long timestamp)

Parameters: resourceName destination timestamp the timestamp to check against, only downloading if newer. If 0, always download

Returns: true if newer version was downloaded, false otherwise.

Throws: TransferFailedException ResourceDoesNotExistException AuthorizationException

getFileList

public List getFileList(String destinationDirectory)

getIfNewer

public boolean getIfNewer(String resourceName, File destination, long timestamp)

getNumberOfAttempts

public int getNumberOfAttempts()

openConnection

public void openConnection()

put

public void put(File source, String resourceName)

resourceExists

public boolean resourceExists(String resourceName)

setNumberOfAttempts

public void setNumberOfAttempts(int numberOfAttempts)