Package org.apache.maven.wagon
Interface StreamingWagon
-
- All Superinterfaces:
Wagon
- All Known Implementing Classes:
AbstractHttpClientWagon,FileWagon,HttpWagon,StreamWagon
public interface StreamingWagon extends Wagon
-
-
Field Summary
-
Fields inherited from interface org.apache.maven.wagon.Wagon
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleangetIfNewerToStream(java.lang.String resourceName, java.io.OutputStream stream, long timestamp)Downloads specified resource from the repository if it was modified since specified date.voidgetToStream(java.lang.String resourceName, java.io.OutputStream stream)Downloads specified resource from the repository to given output stream.voidputFromStream(java.io.InputStream stream, java.lang.String destination)Deprecated.due to unknown contentLength various http(s) implementation will use a chuncked transfer encoding mode you must take care you http target server supports that (ngnix don't !).voidputFromStream(java.io.InputStream stream, java.lang.String destination, long contentLength, long lastModified)Copy from a local input stream to remote.-
Methods inherited from interface org.apache.maven.wagon.Wagon
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, get, getFileList, getIfNewer, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, put, putDirectory, removeSessionListener, removeTransferListener, resourceExists, setInteractive, setReadTimeout, setTimeout, supportsDirectoryCopy
-
-
-
-
Method Detail
-
getToStream
void getToStream(java.lang.String resourceName, java.io.OutputStream stream) throws ResourceDoesNotExistException, TransferFailedException, AuthorizationExceptionDownloads specified resource from the repository to given output stream.- Parameters:
resourceName-stream-- Throws:
TransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionAuthorizationException
-
getIfNewerToStream
boolean getIfNewerToStream(java.lang.String resourceName, java.io.OutputStream stream, long timestamp) throws ResourceDoesNotExistException, TransferFailedException, AuthorizationExceptionDownloads specified resource from the repository if it was modified since specified date. The date is measured in milliseconds, between the current time and midnight, January 1, 1970 UTC and aligned to GMT timezone.- Parameters:
resourceName-stream-timestamp-- Returns:
trueif newer resource has been downloaded,falseif resource in the repository is older or has the same age.- Throws:
TransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionAuthorizationException
-
putFromStream
void putFromStream(java.io.InputStream stream, java.lang.String destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationExceptionDeprecated.due to unknown contentLength various http(s) implementation will use a chuncked transfer encoding mode you must take care you http target server supports that (ngnix don't !). So in case of http(s) transport layer avoid using this. Will be remove in 3.0 Copy from a local input stream to remote.- Parameters:
stream- the local streamdestination- the remote destination- Throws:
TransferFailedExceptionResourceDoesNotExistExceptionAuthorizationException
-
putFromStream
void putFromStream(java.io.InputStream stream, java.lang.String destination, long contentLength, long lastModified) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationExceptionCopy from a local input stream to remote.- Parameters:
stream- the local streamdestination- the remote destination- Throws:
TransferFailedExceptionResourceDoesNotExistExceptionAuthorizationException
-
-