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:
org.apache.maven.wagon.StreamingWagon
,org.apache.maven.wagon.Wagon
- Direct Known Subclasses:
LightweightHttpsWagon
public class LightweightHttpWagon extends org.apache.maven.wagon.StreamWagon
LightweightHttpWagon, using JDK's HttpURLConnection.- Author:
- Michal Maczka
- See Also:
HttpURLConnection
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_REDIRECTS
-
Constructor Summary
Constructors Constructor Description LightweightHttpWagon()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeConnection()
void
fillInputData(org.apache.maven.wagon.InputData inputData)
void
fillOutputData(org.apache.maven.wagon.OutputData outputData)
protected void
finishPutTransfer(org.apache.maven.wagon.resource.Resource resource, java.io.InputStream input, java.io.OutputStream output)
LightweightHttpWagonAuthenticator
getAuthenticator()
java.util.List<java.lang.String>
getFileList(java.lang.String destinationDirectory)
java.util.Properties
getHttpHeaders()
java.net.SocketAddress
getSocketAddress(org.apache.maven.wagon.proxy.ProxyInfo proxyInfo)
boolean
isUseCache()
protected void
openConnectionInternal()
java.net.PasswordAuthentication
requestProxyAuthentication()
java.net.PasswordAuthentication
requestServerAuthentication()
boolean
resourceExists(java.lang.String resourceName)
void
setAuthenticator(LightweightHttpWagonAuthenticator authenticator)
void
setHttpHeaders(java.util.Properties httpHeaders)
void
setPreemptiveAuthentication(boolean preemptiveAuthentication)
void
setUseCache(boolean useCache)
-
Methods inherited from class org.apache.maven.wagon.StreamWagon
checkInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, 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, getReadTimeout, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, 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, 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, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, putDirectory, removeSessionListener, removeTransferListener, setInteractive, setReadTimeout, setTimeout, supportsDirectoryCopy
-
-
-
-
Field Detail
-
MAX_REDIRECTS
public static final int MAX_REDIRECTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
fillInputData
public void fillInputData(org.apache.maven.wagon.InputData inputData) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
- Specified by:
fillInputData
in classorg.apache.maven.wagon.StreamWagon
- Throws:
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.ResourceDoesNotExistException
org.apache.maven.wagon.authorization.AuthorizationException
-
fillOutputData
public void fillOutputData(org.apache.maven.wagon.OutputData outputData) throws org.apache.maven.wagon.TransferFailedException
- Specified by:
fillOutputData
in classorg.apache.maven.wagon.StreamWagon
- Throws:
org.apache.maven.wagon.TransferFailedException
-
finishPutTransfer
protected void finishPutTransfer(org.apache.maven.wagon.resource.Resource resource, java.io.InputStream input, java.io.OutputStream output) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.authorization.AuthorizationException, org.apache.maven.wagon.ResourceDoesNotExistException
- Overrides:
finishPutTransfer
in classorg.apache.maven.wagon.AbstractWagon
- Throws:
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.authorization.AuthorizationException
org.apache.maven.wagon.ResourceDoesNotExistException
-
openConnectionInternal
protected void openConnectionInternal() throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
- Specified by:
openConnectionInternal
in classorg.apache.maven.wagon.AbstractWagon
- Throws:
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
-
requestProxyAuthentication
public java.net.PasswordAuthentication requestProxyAuthentication()
-
requestServerAuthentication
public java.net.PasswordAuthentication requestServerAuthentication()
-
getSocketAddress
public java.net.SocketAddress getSocketAddress(org.apache.maven.wagon.proxy.ProxyInfo proxyInfo)
-
closeConnection
public void closeConnection() throws org.apache.maven.wagon.ConnectionException
- Specified by:
closeConnection
in classorg.apache.maven.wagon.StreamWagon
- Throws:
org.apache.maven.wagon.ConnectionException
-
getFileList
public java.util.List<java.lang.String> getFileList(java.lang.String destinationDirectory) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
- Specified by:
getFileList
in interfaceorg.apache.maven.wagon.Wagon
- Overrides:
getFileList
in classorg.apache.maven.wagon.AbstractWagon
- Throws:
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.ResourceDoesNotExistException
org.apache.maven.wagon.authorization.AuthorizationException
-
resourceExists
public boolean resourceExists(java.lang.String resourceName) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.authorization.AuthorizationException
- Specified by:
resourceExists
in interfaceorg.apache.maven.wagon.Wagon
- Overrides:
resourceExists
in classorg.apache.maven.wagon.AbstractWagon
- Throws:
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.authorization.AuthorizationException
-
isUseCache
public boolean isUseCache()
-
setUseCache
public void setUseCache(boolean useCache)
-
getHttpHeaders
public java.util.Properties getHttpHeaders()
-
setHttpHeaders
public void setHttpHeaders(java.util.Properties httpHeaders)
-
setPreemptiveAuthentication
public void setPreemptiveAuthentication(boolean preemptiveAuthentication)
-
getAuthenticator
public LightweightHttpWagonAuthenticator getAuthenticator()
-
setAuthenticator
public void setAuthenticator(LightweightHttpWagonAuthenticator authenticator)
-
-