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:
- WebDavWagon
public abstract class AbstractHttpClientWagon
- extends StreamWagon
- Author:
- Michal Maczka, James William Dumay
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, getReadTimeout, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putDirectory, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setReadTimeout, 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, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, putDirectory, removeSessionListener, removeTransferListener, setInteractive, setReadTimeout, setTimeout, supportsDirectoryCopy |
SC_NULL
protected static final int SC_NULL
- See Also:
- Constant Field Values
GMT_TIME_ZONE
protected static final TimeZone GMT_TIME_ZONE
connectionManager
protected org.apache.commons.httpclient.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(File source,
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(InputStream stream,
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
- Parameters:
stream
- the local streamdestination
- the remote destination
- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
mkdirs
protected void mkdirs(String dirname)
throws IOException
- Throws:
IOException
resourceExists
public boolean resourceExists(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(org.apache.commons.httpclient.HttpMethod httpMethod)
throws IOException
- Throws:
IOException
setParameters
protected void setParameters(org.apache.commons.httpclient.HttpMethod method)
setHeaders
protected void setHeaders(org.apache.commons.httpclient.HttpMethod method)
getURL
protected 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 org.apache.commons.httpclient.HttpClient getClient()
setConnectionManager
public void setConnectionManager(org.apache.commons.httpclient.HttpConnectionManager connectionManager)
getHttpHeaders
public Properties getHttpHeaders()
setHttpHeaders
public void setHttpHeaders(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
putFromStream
public void putFromStream(InputStream stream,
String destination)
throws TransferFailedException,
ResourceDoesNotExistException,
AuthorizationException
- Specified by:
putFromStream
in interface StreamingWagon
- Overrides:
putFromStream
in class StreamWagon
- Parameters:
stream
- the local streamdestination
- the remote destination
- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
putFromStream
protected void putFromStream(InputStream stream,
Resource resource)
throws TransferFailedException,
AuthorizationException,
ResourceDoesNotExistException
- Overrides:
putFromStream
in class StreamWagon
- Throws:
TransferFailedException
AuthorizationException
ResourceDoesNotExistException
fillOutputData
public void fillOutputData(OutputData outputData)
throws TransferFailedException
- Specified by:
fillOutputData
in class StreamWagon
- Throws:
TransferFailedException
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.