Package org.apache.sshd.git.transport
Class GitSshdSessionFactory
java.lang.Object
org.eclipse.jgit.transport.SshSessionFactory
org.apache.sshd.git.transport.GitSshdSessionFactory
- All Implemented Interfaces:
ClientSessionHolder,SessionContextHolder,SessionHolder<ClientSession>
public class GitSshdSessionFactory
extends org.eclipse.jgit.transport.SshSessionFactory
implements SessionHolder<ClientSession>, ClientSessionHolder
TODO Add javadoc
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SshClientstatic final GitSshdSessionFactoryprivate final ClientSession -
Constructor Summary
ConstructorsModifierConstructorDescriptionGitSshdSessionFactory(ClientSession session) Used to provide an externally managedClientSessioninstance.GitSshdSessionFactory(SshClient client) Used to provide an externally managedSshClientinstance.protectedGitSshdSessionFactory(SshClient client, ClientSession session) -
Method Summary
Modifier and TypeMethodDescriptionprotected SshClientorg.eclipse.jgit.transport.RemoteSessiongetSession(org.eclipse.jgit.transport.URIish uri, org.eclipse.jgit.transport.CredentialsProvider credentialsProvider, org.eclipse.jgit.util.FS fs, int tms) getType()Methods inherited from class org.eclipse.jgit.transport.SshSessionFactory
getInstance, getLocalUserName, releaseSession, setInstanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Field Details
-
INSTANCE
-
client
-
session
-
-
Constructor Details
-
GitSshdSessionFactory
public GitSshdSessionFactory() -
GitSshdSessionFactory
Used to provide an externally managedSshClientinstance. In this case, the caller is responsible for start/stop-ing the client once no longer needed.- Parameters:
client- The (nevernull) client instance
-
GitSshdSessionFactory
Used to provide an externally managedClientSessioninstance. In this case, the caller is responsible for connecting and disconnecting the session once no longer needed. Note: in this case, the connection and authentication phase are skipped - i.e., any specific host/port/user/password(s) specified in the GIT URI are not used.- Parameters:
session- The (nevernull) client session instance
-
GitSshdSessionFactory
-
-
Method Details
-
getType
- Specified by:
getTypein classorg.eclipse.jgit.transport.SshSessionFactory
-
getSession
public org.eclipse.jgit.transport.RemoteSession getSession(org.eclipse.jgit.transport.URIish uri, org.eclipse.jgit.transport.CredentialsProvider credentialsProvider, org.eclipse.jgit.util.FS fs, int tms) throws org.eclipse.jgit.errors.TransportException - Specified by:
getSessionin classorg.eclipse.jgit.transport.SshSessionFactory- Throws:
org.eclipse.jgit.errors.TransportException
-
getClient
-
getClientSession
- Specified by:
getClientSessionin interfaceClientSessionHolder- Returns:
- The underlying
ClientSessionused
-
getSession
- Specified by:
getSessionin interfaceSessionHolder<ClientSession>
-