public abstract class SshTransport extends TcpTransport
Transport.Operation
DEFAULT_FETCH_THIN, DEFAULT_PUSH_THIN, local, REFSPEC_PUSH_ALL, REFSPEC_TAGS, uri
Modifier | Constructor and Description |
---|---|
protected |
SshTransport(Repository local,
URIish uri)
Create a new transport instance.
|
protected |
SshTransport(URIish uri)
Create a new transport instance without a local repository.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected RemoteSession |
getSession()
Get the default SSH session
|
SshSessionFactory |
getSshSessionFactory()
Get the SSH session factory
|
void |
setSshSessionFactory(SshSessionFactory factory)
Set SSH session factory instead of the default one for this instance of
the transport.
|
applyConfig, fetch, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, getCredentialsProvider, getFilterBlobLimit, getObjectChecker, getOptionReceivePack, getOptionUploadPack, getPackConfig, getPushOptions, getTagOpt, getTimeout, getTransportProtocols, getURI, isCheckFetchedObjects, isDryRun, isFetchThin, isPushAtomic, isPushThin, isRemoveDeletedRefs, open, open, open, open, open, open, open, openAll, openAll, openAll, openAll, openFetch, openPush, push, push, register, setCheckFetchedObjects, setCredentialsProvider, setDryRun, setFetchThin, setFilterBlobLimit, setObjectChecker, setOptionReceivePack, setOptionUploadPack, setPackConfig, setPushAtomic, setPushOptions, setPushThin, setRemoveDeletedRefs, setTagOpt, setTimeout, unregister
protected SshTransport(Repository local, URIish uri)
local
- the repository this instance will fetch into, or push out of.
This must be the repository passed to
Transport.open(Repository, URIish)
.uri
- the URI used to access the remote repository. This must be the
URI passed to Transport.open(Repository, URIish)
.protected SshTransport(URIish uri)
uri
- the URI used to access the remote repository. This must be the
URI passed to Transport.open(URIish)
.public void setSshSessionFactory(SshSessionFactory factory)
factory
- a factory to set, must not be nullIllegalStateException
- if session has been already created.public SshSessionFactory getSshSessionFactory()
protected RemoteSession getSession() throws TransportException
TransportException
- in case of error with opening SSH sessionpublic void close()
Close any resources used by this transport.
If the remote repository is contacted by a network socket this method must close that network socket, disconnecting the two peers. If the remote repository is actually local (same system) this method must close any open file handles used to read the "remote" repository.
AutoClosable.close()
declares that it throws Exception
.
Implementers shouldn't throw checked exceptions. This override narrows
the signature to prevent them from doing so.
close
in interface AutoCloseable
close
in class Transport
Copyright © 2018 Eclipse JGit Project. All rights reserved.