org.apache.maven.wagon
Class StreamWagon

java.lang.Object
  extended by org.apache.maven.wagon.AbstractWagon
      extended by org.apache.maven.wagon.StreamWagon
All Implemented Interfaces:
Wagon

public abstract class StreamWagon
extends AbstractWagon

Base class for wagon which provide stream based API.

Version:
$Id: StreamWagon.java 312587 2005-10-10 08:45:12Z brett $
Author:
Michal Maczka

Field Summary
 
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
ROLE
 
Constructor Summary
StreamWagon()
           
 
Method Summary
abstract  void closeConnection()
           
abstract  void fillInputData(InputData inputData)
           
abstract  void fillOutputData(OutputData outputData)
           
 void get(java.lang.String resourceName, java.io.File destination)
          Downloads specified resource from the repository to given file.
 boolean getIfNewer(java.lang.String resourceName, java.io.File destination, long timestamp)
          Downloads specified resource from the repository if it was modfified since specified date.
abstract  void openConnection()
           
 void put(java.io.File source, java.lang.String resourceName)
          Copy a file from local system to remote
 
Methods inherited from class org.apache.maven.wagon.AbstractWagon
addSessionListener, addTransferListener, connect, connect, connect, connect, createParentDirectories, createZip, disconnect, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getFileList, getPath, getProxyInfo, getRepository, getSessionEventSupport, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, postProcessListeners, putDirectory, putTransfer, removeSessionListener, removeTransferListener, resourceExists, setInteractive, setSessionEventSupport, setTransferEventSupport, supportsDirectoryCopy, transfer, transfer, transfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamWagon

public StreamWagon()
Method Detail

fillInputData

public abstract void fillInputData(InputData inputData)
                            throws TransferFailedException,
                                   ResourceDoesNotExistException
Throws:
TransferFailedException
ResourceDoesNotExistException

fillOutputData

public abstract void fillOutputData(OutputData outputData)
                             throws TransferFailedException
Throws:
TransferFailedException

openConnection

public abstract void openConnection()
                             throws ConnectionException,
                                    AuthenticationException
Throws:
ConnectionException
AuthenticationException

closeConnection

public abstract void closeConnection()
                              throws ConnectionException
Specified by:
closeConnection in class AbstractWagon
Throws:
ConnectionException

get

public void get(java.lang.String resourceName,
                java.io.File destination)
         throws TransferFailedException,
                ResourceDoesNotExistException,
                AuthorizationException
Description copied from interface: Wagon
Downloads specified resource from the repository to given file.

Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

getIfNewer

public boolean getIfNewer(java.lang.String resourceName,
                          java.io.File destination,
                          long timestamp)
                   throws TransferFailedException,
                          ResourceDoesNotExistException,
                          AuthorizationException
Description copied from interface: Wagon
Downloads specified resource from the repository if it was modfified since specified date. The date is measured in milliseconds, between the current time and midnight, January 1, 1970 UTC and aliged to GMT timezone.

Returns:
true if newer resource has been downloaded, false if resource in the repository is older or has the same age.
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException

put

public void put(java.io.File source,
                java.lang.String resourceName)
         throws TransferFailedException,
                ResourceDoesNotExistException,
                AuthorizationException
Description copied from interface: Wagon
Copy a file from local system to remote

Parameters:
source - the local file
resourceName - the remote destination
Throws:
TransferFailedException
ResourceDoesNotExistException
AuthorizationException