org.apache.maven.wagon.providers.ssh.jsch
Class ScpWagon

java.lang.Object
  extended by org.apache.maven.wagon.AbstractWagon
      extended by org.apache.maven.wagon.StreamWagon
          extended by org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon
              extended by org.apache.maven.wagon.providers.ssh.jsch.ScpWagon
All Implemented Interfaces:
CommandExecutor, SshWagon, StreamingWagon, Wagon
Direct Known Subclasses:
ScpCommandExecutor

public class ScpWagon
extends AbstractJschWagon

SCP protocol wagon.

Note that this implementation is not thread-safe, and multiple channels can not be used on the session at the same time.

See http://blogs.sun.com/janp/entry/how_the_scp_protocol_works for information on how the SCP protocol works.

Version:
$Id: ScpWagon.java 1174063 2011-09-22 11:22:43Z olamy $
Plexus component:
role-hint:
"scp"
instantiation-strategy:
"per-lookup"
role:
"org.apache.maven.wagon.Wagon"

Field Summary
 
Fields inherited from class org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon
EXEC_CHANNEL, session, sshTool
 
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.CommandExecutor
ROLE
 
Constructor Summary
ScpWagon()
           
 
Method Summary
protected  void cleanupGetTransfer(Resource resource)
           
protected  void cleanupPutTransfer(Resource resource)
           
 void fillInputData(InputData inputData)
           
 void fillOutputData(OutputData outputData)
           
protected  void finishGetTransfer(Resource resource, InputStream input, OutputStream output)
           
protected  void finishPutTransfer(Resource resource, InputStream input, OutputStream output)
           
 String getOctalMode(RepositoryPermissions permissions)
           
protected  void getTransfer(Resource resource, OutputStream output, InputStream input, boolean closeInput, int maxSize)
           
protected  String readLine(InputStream in)
           
protected static void sendEom(OutputStream out)
           
 
Methods inherited from class org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon
closeConnection, executeCommand, executeCommand, getFileList, getInteractiveUserInfo, getKnownHostsProvider, handleGetException, openConnectionInternal, putDirectory, resourceExists, setInteractiveUserInfo, setKnownHostsProvider, supportsDirectoryCopy
 
Methods inherited from class org.apache.maven.wagon.StreamWagon
checkInputStream, checkOutputStream, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, putFromStream
 
Methods inherited from class org.apache.maven.wagon.AbstractWagon
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, createParentDirectories, disconnect, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getPath, getPermissionsOverride, getProxyInfo, getProxyInfo, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setSessionEventSupport, setTimeout, setTransferEventSupport, transfer, transfer, transfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.wagon.Wagon
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, get, getIfNewer, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, put, removeSessionListener, removeTransferListener, setInteractive, setTimeout
 

Constructor Detail

ScpWagon

public ScpWagon()
Method Detail

cleanupPutTransfer

protected void cleanupPutTransfer(Resource resource)
Overrides:
cleanupPutTransfer in class AbstractWagon

finishPutTransfer

protected void finishPutTransfer(Resource resource,
                                 InputStream input,
                                 OutputStream output)
                          throws TransferFailedException
Overrides:
finishPutTransfer in class AbstractWagon
Throws:
TransferFailedException

finishGetTransfer

protected void finishGetTransfer(Resource resource,
                                 InputStream input,
                                 OutputStream output)
                          throws TransferFailedException
Overrides:
finishGetTransfer in class AbstractWagon
Throws:
TransferFailedException

cleanupGetTransfer

protected void cleanupGetTransfer(Resource resource)
Overrides:
cleanupGetTransfer in class AbstractWagon

getTransfer

protected void getTransfer(Resource resource,
                           OutputStream output,
                           InputStream input,
                           boolean closeInput,
                           int maxSize)
                    throws TransferFailedException
Overrides:
getTransfer in class AbstractWagon
Throws:
TransferFailedException

readLine

protected String readLine(InputStream in)
                   throws IOException
Throws:
IOException

sendEom

protected static void sendEom(OutputStream out)
                       throws IOException
Throws:
IOException

fillInputData

public void fillInputData(InputData inputData)
                   throws TransferFailedException,
                          ResourceDoesNotExistException
Specified by:
fillInputData in class StreamWagon
Throws:
TransferFailedException
ResourceDoesNotExistException

fillOutputData

public void fillOutputData(OutputData outputData)
                    throws TransferFailedException
Specified by:
fillOutputData in class StreamWagon
Throws:
TransferFailedException

getOctalMode

public String getOctalMode(RepositoryPermissions permissions)


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.