public class LightweightHttpWagon extends StreamWagon
HttpURLConnection
Modifier and Type | Field and Description |
---|---|
static int |
MAX_REDIRECTS |
authenticationInfo, BUFFER_SEGMENT_SIZE, DEFAULT_BUFFER_SIZE, interactive, MAXIMUM_BUFFER_SIZE, MINIMUM_AMOUNT_OF_TRANSFER_CHUNKS, proxyInfo, repository, sessionEventSupport, transferEventSupport
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE
Constructor and Description |
---|
LightweightHttpWagon() |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection() |
void |
fillInputData(InputData inputData) |
void |
fillOutputData(OutputData outputData) |
protected void |
finishPutTransfer(Resource resource,
InputStream input,
OutputStream output) |
LightweightHttpWagonAuthenticator |
getAuthenticator() |
Properties |
getHttpHeaders() |
SocketAddress |
getSocketAddress(ProxyInfo proxyInfo) |
boolean |
isUseCache() |
protected void |
openConnectionInternal() |
PasswordAuthentication |
requestProxyAuthentication() |
PasswordAuthentication |
requestServerAuthentication() |
boolean |
resourceExists(String resourceName)
Check if a remote resource exists
|
void |
setAuthenticator(LightweightHttpWagonAuthenticator authenticator) |
void |
setHttpHeaders(Properties httpHeaders) |
void |
setPreemptiveAuthentication(boolean preemptiveAuthentication) |
void |
setUseCache(boolean useCache) |
checkInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, putFromStream, putFromStream
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, getBufferCapacityForTransfer, getFileList, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, getFileList, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, putDirectory, removeSessionListener, removeTransferListener, setInteractive, setReadTimeout, setTimeout, supportsDirectoryCopy
public static final int MAX_REDIRECTS
public LightweightHttpWagon()
public void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
fillInputData
in class StreamWagon
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
public void fillOutputData(OutputData outputData) throws TransferFailedException
fillOutputData
in class StreamWagon
TransferFailedException
protected void finishPutTransfer(Resource resource, InputStream input, OutputStream output) throws TransferFailedException, AuthorizationException, ResourceDoesNotExistException
finishPutTransfer
in class AbstractWagon
TransferFailedException
AuthorizationException
ResourceDoesNotExistException
protected void openConnectionInternal() throws ConnectionException, AuthenticationException
openConnectionInternal
in class AbstractWagon
ConnectionException
AuthenticationException
public PasswordAuthentication requestProxyAuthentication()
public PasswordAuthentication requestServerAuthentication()
public SocketAddress getSocketAddress(ProxyInfo proxyInfo)
public void closeConnection() throws ConnectionException
closeConnection
in class StreamWagon
ConnectionException
public boolean resourceExists(String resourceName) throws TransferFailedException, AuthorizationException
Wagon
resourceExists
in interface Wagon
resourceExists
in class AbstractWagon
TransferFailedException
- if there's an error trying to access the remote sideAuthorizationException
- if not authorized to verify the existence of the resourcepublic boolean isUseCache()
public void setUseCache(boolean useCache)
public Properties getHttpHeaders()
public void setHttpHeaders(Properties httpHeaders)
public void setPreemptiveAuthentication(boolean preemptiveAuthentication)
public LightweightHttpWagonAuthenticator getAuthenticator()
public void setAuthenticator(LightweightHttpWagonAuthenticator authenticator)
Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.