org.apache.maven.wagon.shared.http
Class AbstractHttpClientWagon
java.lang.Object
org.apache.maven.wagon.AbstractWagon
org.apache.maven.wagon.StreamWagon
org.apache.maven.wagon.shared.http.AbstractHttpClientWagon
- All Implemented Interfaces:
- StreamingWagon, Wagon
- Direct Known Subclasses:
- HttpWagon
public abstract class AbstractHttpClientWagon
- extends StreamWagon
- Author:
- Michal Maczka, James William Dumay
Fields inherited from interface org.apache.maven.wagon.Wagon |
ROLE |
Methods inherited from class org.apache.maven.wagon.AbstractWagon |
addSessionListener, addTransferListener, cleanupPutTransfer, connect, connect, connect, connect, connect, connect, createParentDirectories, disconnect, finishGetTransfer, finishPutTransfer, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getFileList, getPath, getPermissionsOverride, getProxyInfo, getProxyInfo, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putDirectory, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setSessionEventSupport, setTimeout, setTransferEventSupport, supportsDirectoryCopy, transfer, transfer, transfer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.maven.wagon.Wagon |
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, getFileList, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, putDirectory, removeSessionListener, removeTransferListener, setInteractive, setTimeout, supportsDirectoryCopy |
SC_NULL
protected static final int SC_NULL
- See Also:
- Constant Field Values
GMT_TIME_ZONE
protected static final java.util.TimeZone GMT_TIME_ZONE
connectionManager
protected HttpConnectionManager connectionManager
AbstractHttpClientWagon
public AbstractHttpClientWagon()
openConnectionInternal
public void openConnectionInternal()
- Specified by:
openConnectionInternal
in class AbstractWagon
closeConnection
public void closeConnection()
- Specified by:
closeConnection
in class StreamWagon
put
public void put(java.io.File source,
java.lang.String resourceName)
throws TransferFailedException,
ResourceDoesNotExistException,
AuthorizationException
- Description copied from interface:
Wagon
- Copy a file from local system to remote
- Specified by:
put
in interface Wagon
- Overrides:
put
in class StreamWagon
- Parameters:
source
- the local fileresourceName
- the remote destination
- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
putFromStream
public void putFromStream(java.io.InputStream stream,
java.lang.String destination,
long contentLength,
long lastModified)
throws TransferFailedException,
ResourceDoesNotExistException,
AuthorizationException
- Description copied from interface:
StreamingWagon
- Copy from a local input stream to remote.
- Specified by:
putFromStream
in interface StreamingWagon
- Overrides:
putFromStream
in class StreamWagon
destination
- the remote destination
- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
mkdirs
protected void mkdirs(java.lang.String dirname)
throws HttpException,
java.io.IOException
- Throws:
HttpException
java.io.IOException
resourceExists
public boolean resourceExists(java.lang.String resourceName)
throws TransferFailedException,
AuthorizationException
- Description copied from interface:
Wagon
- Check if a remote resource exists
- Specified by:
resourceExists
in interface Wagon
- Overrides:
resourceExists
in class AbstractWagon
- Returns:
- whether the resource exists or not
- Throws:
TransferFailedException
- if there's an error trying to access the remote side
AuthorizationException
- if not authorized to verify the existence of the resource
execute
protected int execute(HttpMethod httpMethod)
throws HttpException,
java.io.IOException
- Throws:
HttpException
java.io.IOException
setParameters
protected void setParameters(HttpMethod method)
setHeaders
protected void setHeaders(HttpMethod method)
getURL
protected java.lang.String getURL(Repository repository)
- getUrl
Implementors can override this to remove unwanted parts of the url such as role-hints
- Parameters:
repository
-
- Returns:
getClient
protected HttpClient getClient()
setConnectionManager
public void setConnectionManager(HttpConnectionManager connectionManager)
getHttpHeaders
public java.util.Properties getHttpHeaders()
setHttpHeaders
public void setHttpHeaders(java.util.Properties httpHeaders)
getHttpConfiguration
public HttpConfiguration getHttpConfiguration()
setHttpConfiguration
public void setHttpConfiguration(HttpConfiguration httpConfiguration)
fillInputData
public void fillInputData(InputData inputData)
throws TransferFailedException,
ResourceDoesNotExistException,
AuthorizationException
- Specified by:
fillInputData
in class StreamWagon
- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
cleanupGetTransfer
protected void cleanupGetTransfer(Resource resource)
- Overrides:
cleanupGetTransfer
in class AbstractWagon
fillOutputData
public void fillOutputData(OutputData outputData)
throws TransferFailedException
- Specified by:
fillOutputData
in class StreamWagon
- Throws:
TransferFailedException