Class SshTransport

    • Constructor Detail

      • SshTransport

        protected SshTransport​(URIish uri)
        Create a new transport instance without a local repository.
        uri - the URI used to access the remote repository. This must be the URI passed to
    • Method Detail

      • setSshSessionFactory

        public void setSshSessionFactory​(SshSessionFactory factory)
        Set SSH session factory instead of the default one for this instance of the transport.
        factory - a factory to set, must not be null
        IllegalStateException - if session has been already created.
      • getSshSessionFactory

        public SshSessionFactory getSshSessionFactory()
        Get the SSH session factory
        the SSH session factory that will be used for creating SSH sessions
      • close

        public 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.

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in class Transport