org.apache.maven.wagon.providers.http
Class LightweightHttpWagon
java.lang.Object
org.apache.maven.wagon.AbstractWagon
org.apache.maven.wagon.StreamWagon
org.apache.maven.wagon.providers.http.LightweightHttpWagon
- All Implemented Interfaces:
- StreamingWagon, Wagon
- Direct Known Subclasses:
- LightweightHttpsWagon
public class LightweightHttpWagon
- extends StreamWagon
LightweightHttpWagon, using JDK's HttpURLConnection.
- Version:
- $Id: LightweightHttpWagon.java 1174807 2011-09-23 14:28:36Z olamy $
- Author:
- Michal Maczka
- See Also:
HttpURLConnection
- Plexus component:
- role-hint:
- "http"
- instantiation-strategy:
- "per-lookup"
- role:
- "org.apache.maven.wagon.Wagon"
|
Fields inherited from interface org.apache.maven.wagon.Wagon |
ROLE |
Methods inherited from class org.apache.maven.wagon.StreamWagon |
checkInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, putFromStream |
Methods inherited from class org.apache.maven.wagon.AbstractWagon |
addSessionListener, addTransferListener, cleanupGetTransfer, cleanupPutTransfer, connect, connect, connect, connect, connect, connect, createParentDirectories, disconnect, finishGetTransfer, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, 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, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, putDirectory, removeSessionListener, removeTransferListener, setInteractive, setTimeout, supportsDirectoryCopy |
MAX_REDIRECTS
public static final int MAX_REDIRECTS
- See Also:
- Constant Field Values
LightweightHttpWagon
public LightweightHttpWagon()
fillInputData
public void fillInputData(InputData inputData)
throws TransferFailedException,
ResourceDoesNotExistException,
AuthorizationException
- Specified by:
fillInputData
in class StreamWagon
- Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
fillOutputData
public void fillOutputData(OutputData outputData)
throws TransferFailedException
- Specified by:
fillOutputData
in class StreamWagon
- Throws:
TransferFailedException
finishPutTransfer
protected void finishPutTransfer(Resource resource,
InputStream input,
OutputStream output)
throws TransferFailedException,
AuthorizationException,
ResourceDoesNotExistException
- Overrides:
finishPutTransfer
in class AbstractWagon
- Throws:
TransferFailedException
AuthorizationException
ResourceDoesNotExistException
openConnectionInternal
protected void openConnectionInternal()
throws ConnectionException,
AuthenticationException
- Specified by:
openConnectionInternal
in class AbstractWagon
- Throws:
ConnectionException
AuthenticationException
requestProxyAuthentication
public PasswordAuthentication requestProxyAuthentication()
requestServerAuthentication
public PasswordAuthentication requestServerAuthentication()
getSocketAddress
public SocketAddress getSocketAddress(ProxyInfo proxyInfo)
closeConnection
public void closeConnection()
throws ConnectionException
- Specified by:
closeConnection
in class StreamWagon
- Throws:
ConnectionException
getFileList
public List<String> getFileList(String destinationDirectory)
throws TransferFailedException,
ResourceDoesNotExistException,
AuthorizationException
- Description copied from interface:
Wagon
-
Returns a
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.
- Specified by:
getFileList
in interface Wagon
- Overrides:
getFileList
in class AbstractWagon
- Parameters:
destinationDirectory
- directory to list contents of
- Returns:
- A
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.
- Throws:
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 directory
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
isUseCache
public boolean isUseCache()
setUseCache
public void setUseCache(boolean useCache)
getHttpHeaders
public Properties getHttpHeaders()
setHttpHeaders
public void setHttpHeaders(Properties httpHeaders)
setPreemptiveAuthentication
public void setPreemptiveAuthentication(boolean preemptiveAuthentication)
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.