org.apache.maven.wagon.providers.http
Class LightweightHttpWagon

java.lang.Object
  extended by org.apache.maven.wagon.AbstractWagon
      extended by org.apache.maven.wagon.StreamWagon
          extended by 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 1208429 2011-11-30 13:54:26Z olamy $
Author:
Michal Maczka
See Also:
HttpURLConnection

Field Summary
static int MAX_REDIRECTS
           
 
Fields inherited from class org.apache.maven.wagon.AbstractWagon
authenticationInfo, DEFAULT_BUFFER_SIZE, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupport
 
Fields inherited from interface org.apache.maven.wagon.Wagon
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE
 
Constructor Summary
LightweightHttpWagon()
           
 
Method Summary
 void closeConnection()
           
 void fillInputData(InputData inputData)
           
 void fillOutputData(OutputData outputData)
           
protected  void finishPutTransfer(Resource resource, InputStream input, OutputStream output)
           
 List<String> getFileList(String destinationDirectory)
           
 Properties getHttpHeaders()
           
 SocketAddress getSocketAddress(ProxyInfo proxyInfo)
           
 boolean isUseCache()
           
protected  void openConnectionInternal()
           
 PasswordAuthentication requestProxyAuthentication()
           
 PasswordAuthentication requestServerAuthentication()
           
 boolean resourceExists(String resourceName)
           
 void setHttpHeaders(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, 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, 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
Constructor Detail

LightweightHttpWagon

public LightweightHttpWagon()
Method Detail

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
Specified by:
getFileList in interface Wagon
Overrides:
getFileList in class AbstractWagon
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

resourceExists

public boolean resourceExists(String resourceName)
                       throws TransferFailedException,
                              AuthorizationException
Specified by:
resourceExists in interface Wagon
Overrides:
resourceExists in class AbstractWagon
Throws:
TransferFailedException
AuthorizationException

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.