public abstract class AbstractHttpClientWagon extends StreamWagon
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.httpclient.HttpConnectionManager |
connectionManager |
protected static TimeZone |
GMT_TIME_ZONE |
protected static int |
SC_NULL |
authenticationInfo, DEFAULT_BUFFER_SIZE, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupportDEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE| Constructor and Description |
|---|
AbstractHttpClientWagon() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
calculateRelocatedUrl(org.apache.commons.httpclient.methods.EntityEnclosingMethod method) |
protected void |
cleanupGetTransfer(Resource resource) |
void |
closeConnection() |
protected int |
execute(org.apache.commons.httpclient.HttpMethod httpMethod) |
void |
fillInputData(InputData inputData) |
void |
fillOutputData(OutputData outputData) |
protected org.apache.commons.httpclient.HttpClient |
getClient() |
HttpConfiguration |
getHttpConfiguration() |
Properties |
getHttpHeaders() |
protected String |
getURL(Repository repository)
getUrl
Implementors can override this to remove unwanted parts of the url such as role-hints
|
protected void |
mkdirs(String dirname) |
void |
openConnectionInternal() |
void |
put(File source,
String resourceName)
Copy a file from local system to remote
|
protected void |
putFromStream(InputStream stream,
Resource resource) |
void |
putFromStream(InputStream stream,
String destination) |
void |
putFromStream(InputStream stream,
String destination,
long contentLength,
long lastModified)
Copy from a local input stream to remote.
|
boolean |
resourceExists(String resourceName)
Check if a remote resource exists
|
void |
setConnectionManager(org.apache.commons.httpclient.HttpConnectionManager connectionManager) |
protected void |
setHeaders(org.apache.commons.httpclient.HttpMethod method) |
void |
setHttpConfiguration(HttpConfiguration httpConfiguration) |
void |
setHttpHeaders(Properties httpHeaders) |
protected void |
setParameters(org.apache.commons.httpclient.HttpMethod method) |
checkInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStreamaddSessionListener, 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, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putDirectory, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setReadTimeout, setSessionEventSupport, setTimeout, setTransferEventSupport, supportsDirectoryCopy, transfer, transfer, transfer, transferclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, getFileList, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, putDirectory, removeSessionListener, removeTransferListener, setInteractive, setReadTimeout, setTimeout, supportsDirectoryCopyprotected static final int SC_NULL
protected static final TimeZone GMT_TIME_ZONE
protected org.apache.commons.httpclient.HttpConnectionManager connectionManager
public AbstractHttpClientWagon()
public void openConnectionInternal()
openConnectionInternal in class AbstractWagonpublic void closeConnection()
closeConnection in class StreamWagonpublic void put(File source, String resourceName) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagonput in interface Wagonput in class StreamWagonsource - the local fileresourceName - the remote destinationTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionpublic void putFromStream(InputStream stream, String destination, long contentLength, long lastModified) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
StreamingWagonputFromStream in interface StreamingWagonputFromStream in class StreamWagonstream - the local streamdestination - the remote destinationTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionprotected String calculateRelocatedUrl(org.apache.commons.httpclient.methods.EntityEnclosingMethod method)
protected void mkdirs(String dirname) throws IOException
IOExceptionpublic boolean resourceExists(String resourceName) throws TransferFailedException, AuthorizationException
WagonresourceExists in interface WagonresourceExists in class AbstractWagonTransferFailedException - if there's an error trying to access the remote sideAuthorizationException - if not authorized to verify the existence of the resourceprotected int execute(org.apache.commons.httpclient.HttpMethod httpMethod) throws IOException
IOExceptionprotected void setParameters(org.apache.commons.httpclient.HttpMethod method)
protected void setHeaders(org.apache.commons.httpclient.HttpMethod method)
protected String getURL(Repository repository)
repository - protected org.apache.commons.httpclient.HttpClient getClient()
public void setConnectionManager(org.apache.commons.httpclient.HttpConnectionManager connectionManager)
public Properties getHttpHeaders()
public void setHttpHeaders(Properties httpHeaders)
public HttpConfiguration getHttpConfiguration()
public void setHttpConfiguration(HttpConfiguration httpConfiguration)
public void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
fillInputData in class StreamWagonTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionprotected void cleanupGetTransfer(Resource resource)
cleanupGetTransfer in class AbstractWagonpublic void putFromStream(InputStream stream, String destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
putFromStream in interface StreamingWagonputFromStream in class StreamWagonstream - the local streamdestination - the remote destinationTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionprotected void putFromStream(InputStream stream, Resource resource) throws TransferFailedException, AuthorizationException, ResourceDoesNotExistException
putFromStream in class StreamWagonTransferFailedExceptionAuthorizationExceptionResourceDoesNotExistExceptionpublic void fillOutputData(OutputData outputData) throws TransferFailedException
fillOutputData in class StreamWagonTransferFailedExceptionCopyright © 2003–2013 The Apache Software Foundation. All rights reserved.