public abstract class AbstractSshBasedRepository extends AbstractRepository
| Constructor and Description |
|---|
AbstractSshBasedRepository() |
AbstractSshBasedRepository(TimeoutConstraint timeoutConstraint) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHost() |
java.io.File |
getKeyFile() |
java.lang.String |
getKeyFilePassword() |
java.io.File |
getPassFile() |
int |
getPort() |
protected abstract java.lang.String |
getRepositoryScheme() |
protected com.jcraft.jsch.Session |
getSession(java.lang.String pathOrUri)
get a new session using the default attributes if the given String is a full uri, use the
data from the uri instead
|
java.lang.String |
getSshConfig() |
java.lang.String |
getUser() |
java.lang.String |
getUserPassword() |
boolean |
isAllowedAgentUse() |
protected void |
releaseSession(com.jcraft.jsch.Session session,
java.lang.String pathOrUri)
closes the session and remove it from the cache (eg. on case of errors)
|
void |
setAllowedAgentUse(boolean allowedAgentUse) |
void |
setHost(java.lang.String host) |
void |
setKeyFile(java.io.File filePath)
Sets the full file path to use for accessing a PEM key file
|
void |
setKeyFilePassword(java.lang.String keyFilePassword) |
void |
setPassFile(java.io.File passFile) |
void |
setPort(int port) |
void |
setSshConfig(java.lang.String sshConfig) |
void |
setUser(java.lang.String user)
set the default user to use for the connection if no user is given or a PEM file is used
|
void |
setUserPassword(java.lang.String password) |
addTransferListener, fireTransferCompleted, fireTransferCompleted, fireTransferError, fireTransferError, fireTransferEvent, fireTransferInitiated, fireTransferProgress, fireTransferStarted, fireTransferStarted, getFileSeparator, getName, getTimeoutConstraint, hasTransferListener, put, put, removeTransferListener, setName, standardize, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitget, getResource, listpublic AbstractSshBasedRepository()
public AbstractSshBasedRepository(TimeoutConstraint timeoutConstraint)
protected com.jcraft.jsch.Session getSession(java.lang.String pathOrUri)
throws java.io.IOException
pathOrUri - might be just a path or a full ssh or sftp urijava.io.IOException - if something goes wrongprotected void releaseSession(com.jcraft.jsch.Session session,
java.lang.String pathOrUri)
session - key for the cachepathOrUri - to releasepublic void setUser(java.lang.String user)
user - to usepublic java.lang.String getUser()
public void setKeyFile(java.io.File filePath)
filePath - fully qualified namepublic java.io.File getKeyFile()
public void setUserPassword(java.lang.String password)
password - password to use for user/password authenticationpublic java.lang.String getKeyFilePassword()
public void setKeyFilePassword(java.lang.String keyFilePassword)
keyFilePassword - sets password for public key based authenticationpublic java.lang.String getUserPassword()
public java.lang.String getHost()
public void setHost(java.lang.String host)
host - the host to setpublic int getPort()
public void setPort(int port)
port - the port to setpublic void setPassFile(java.io.File passFile)
passFile - the passfile to setpublic java.io.File getPassFile()
public boolean isAllowedAgentUse()
public void setAllowedAgentUse(boolean allowedAgentUse)
allowedAgentUse - Whether use of a local SSH agent for authentication is allowedpublic java.lang.String getSshConfig()
public void setSshConfig(java.lang.String sshConfig)
sshConfig - Path to a local ssh config fileprotected abstract java.lang.String getRepositoryScheme()
Copyright ©2007-2022 The Apache Software Foundation, Licensed under Apache License, Version 2.0.