public abstract class AbstractSshBasedRepository extends AbstractRepository
Constructor and Description |
---|
AbstractSshBasedRepository() |
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 |
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.
|
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 |
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, hasTransferListener, put, put, removeTransferListener, setName, standardize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, getResource, list
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
protected 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 allowedprotected abstract java.lang.String getRepositoryScheme()