public abstract class AbstractJschWagon extends StreamWagon implements SshWagon, CommandExecutor
Modifier and Type | Field and Description |
---|---|
protected static String |
EXEC_CHANNEL |
protected com.jcraft.jsch.Session |
session |
protected ScpHelper |
sshTool |
authenticationInfo, BUFFER_SEGMENT_SIZE, DEFAULT_BUFFER_SIZE, interactive, MAXIMUM_BUFFER_SIZE, MINIMUM_AMOUNT_OF_TRANSFER_CHUNKS, proxyInfo, repository, sessionEventSupport, transferEventSupport
ROLE
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT
Constructor and Description |
---|
AbstractJschWagon() |
checkInputStream, checkOutputStream, fillInputData, fillOutputData, get, getIfNewer, getIfNewerToStream, getInputStream, getOutputStream, getToStream, put, putFromStream, putFromStream, putFromStream
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, getBufferCapacityForTransfer, getPath, getPermissionsOverride, getProxyInfo, getProxyInfo, getReadTimeout, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setReadTimeout, setSessionEventSupport, setTimeout, setTransferEventSupport, transfer, transfer, transfer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, get, getIfNewer, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, isInteractive, openConnection, put, removeSessionListener, removeTransferListener, setInteractive, setReadTimeout, setTimeout
protected com.jcraft.jsch.Session session
protected static final String EXEC_CHANNEL
public AbstractJschWagon()
public void openConnectionInternal() throws AuthenticationException
openConnectionInternal
in class AbstractWagon
AuthenticationException
public void closeConnection()
closeConnection
in class StreamWagon
public Streams executeCommand(String command, boolean ignoreStdErr, boolean ignoreNoneZeroExitCode) throws CommandExecutionException
CommandExecutionException
protected void handleGetException(Resource resource, Exception e) throws TransferFailedException
TransferFailedException
public List<String> getFileList(String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
getFileList
in interface Wagon
getFileList
in class AbstractWagon
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
public void putDirectory(File sourceDirectory, String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
putDirectory
in interface Wagon
putDirectory
in class AbstractWagon
TransferFailedException
ResourceDoesNotExistException
AuthorizationException
public boolean resourceExists(String resourceName) throws TransferFailedException, AuthorizationException
resourceExists
in interface Wagon
resourceExists
in class AbstractWagon
TransferFailedException
AuthorizationException
public boolean supportsDirectoryCopy()
supportsDirectoryCopy
in interface Wagon
supportsDirectoryCopy
in class AbstractWagon
public void executeCommand(String command) throws CommandExecutionException
executeCommand
in interface CommandExecutor
CommandExecutionException
public Streams executeCommand(String command, boolean ignoreFailures) throws CommandExecutionException
executeCommand
in interface CommandExecutor
CommandExecutionException
public InteractiveUserInfo getInteractiveUserInfo()
public KnownHostsProvider getKnownHostsProvider()
public void setInteractiveUserInfo(InteractiveUserInfo interactiveUserInfo)
public void setKnownHostsProvider(KnownHostsProvider knownHostsProvider)
setKnownHostsProvider
in interface SshWagon
public void setUIKeyboardInteractive(com.jcraft.jsch.UIKeyboardInteractive uIKeyboardInteractive)
public String getPreferredAuthentications()
public void setPreferredAuthentications(String preferredAuthentications)
public String getStrictHostKeyChecking()
public void setStrictHostKeyChecking(String strictHostKeyChecking)
protected void transfer(Resource resource, InputStream input, OutputStream output, int requestType, long maxSize) throws IOException
transfer
in class AbstractWagon
IOException
Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.