public abstract class StreamWagon extends AbstractWagon implements StreamingWagon
authenticationInfo, DEFAULT_BUFFER_SIZE, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupportDEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE| Constructor and Description |
|---|
StreamWagon() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInputStream(InputStream is,
Resource resource) |
protected void |
checkOutputStream(Resource resource,
OutputStream os) |
abstract void |
closeConnection() |
abstract void |
fillInputData(InputData inputData) |
abstract void |
fillOutputData(OutputData outputData) |
void |
get(String resourceName,
File destination)
Downloads specified resource from the repository to given file.
|
boolean |
getIfNewer(String resourceName,
File destination,
long timestamp)
Downloads specified resource from the repository
if it was modified since specified date.
|
boolean |
getIfNewerToStream(String resourceName,
OutputStream stream,
long timestamp)
Downloads specified resource from the repository if it was modified since specified date.
|
protected InputStream |
getInputStream(Resource resource) |
protected OutputStream |
getOutputStream(Resource resource) |
void |
getToStream(String resourceName,
OutputStream stream)
Downloads specified resource from the repository to given output stream.
|
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.
|
addSessionListener, addTransferListener, cleanupGetTransfer, 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, openConnectionInternal, postProcessListeners, putDirectory, putTransfer, putTransfer, removeSessionListener, removeTransferListener, resourceExists, 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, resourceExists, setInteractive, setReadTimeout, setTimeout, supportsDirectoryCopypublic StreamWagon()
public abstract void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
public abstract void fillOutputData(OutputData outputData) throws TransferFailedException
TransferFailedExceptionpublic abstract void closeConnection() throws ConnectionException
closeConnection in class AbstractWagonConnectionExceptionpublic void get(String resourceName, File destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagonget in interface WagonTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionprotected void checkInputStream(InputStream is, Resource resource) throws TransferFailedException
TransferFailedExceptionpublic boolean getIfNewer(String resourceName, File destination, long timestamp) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
WagongetIfNewer in interface Wagontrue if newer resource has been downloaded, false if resource
in the repository is older or has the same age.TransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionprotected InputStream getInputStream(Resource resource) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
public void put(File source, String resourceName) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagonput in interface Wagonsource - the local fileresourceName - the remote destinationTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionprotected void checkOutputStream(Resource resource, OutputStream os) throws TransferFailedException
TransferFailedExceptionprotected OutputStream getOutputStream(Resource resource) throws TransferFailedException
TransferFailedExceptionpublic boolean getIfNewerToStream(String resourceName, OutputStream stream, long timestamp) throws ResourceDoesNotExistException, TransferFailedException, AuthorizationException
StreamingWagongetIfNewerToStream in interface StreamingWagontrue if newer resource has been downloaded, false if resource in the
repository is older or has the same age.ResourceDoesNotExistExceptionTransferFailedExceptionAuthorizationExceptionpublic void getToStream(String resourceName, OutputStream stream) throws ResourceDoesNotExistException, TransferFailedException, AuthorizationException
StreamingWagongetToStream in interface StreamingWagonResourceDoesNotExistExceptionTransferFailedExceptionAuthorizationExceptionpublic void putFromStream(InputStream stream, String destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
putFromStream in interface StreamingWagonstream - the local streamdestination - the remote destinationTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionpublic void putFromStream(InputStream stream, String destination, long contentLength, long lastModified) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
StreamingWagonputFromStream in interface StreamingWagonstream - the local streamdestination - the remote destinationTransferFailedExceptionResourceDoesNotExistExceptionAuthorizationExceptionprotected void putFromStream(InputStream stream, Resource resource) throws TransferFailedException, AuthorizationException, ResourceDoesNotExistException
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.