Class TransportBundleFile

java.lang.Object
org.eclipse.jgit.transport.Transport
org.eclipse.jgit.transport.TransportBundleFile
All Implemented Interfaces:
AutoCloseable, PackTransport, TransportBundle

class TransportBundleFile extends Transport implements TransportBundle
  • Field Details

  • Constructor Details

    • TransportBundleFile

      TransportBundleFile(Repository local, URIish uri, File bundlePath)
    • TransportBundleFile

      public TransportBundleFile(URIish uri, File bundlePath)
      Constructor for TransportBundleFile.
      Parameters:
      uri - a URIish object.
      bundlePath - transport bundle path
  • Method Details

    • openFetch

      Begins a new connection for fetching from the remote repository.

      If the transport has no local repository, the fetch connection can only be used for reading remote refs.

      Specified by:
      openFetch in class Transport
      Returns:
      a fresh connection to fetch from the remote repository.
      Throws:
      NotSupportedException - the implementation does not support fetching.
      TransportException - the remote connection could not be established.
    • openPush

      public PushConnection openPush() throws NotSupportedException
      Begins a new connection for pushing into the remote repository.
      Specified by:
      openPush in class Transport
      Returns:
      a fresh connection to push into the remote repository.
      Throws:
      NotSupportedException - the implementation does not support pushing.
    • 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