Package org.eclipse.jgit.transport
Class TransportBundleFile
- java.lang.Object
-
- org.eclipse.jgit.transport.Transport
-
- org.eclipse.jgit.transport.TransportBundleFile
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,PackTransport
,TransportBundle
class TransportBundleFile extends Transport implements TransportBundle
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.Transport
Transport.Operation
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
bundle
(package private) static TransportProtocol
PROTO_BUNDLE
-
Fields inherited from class org.eclipse.jgit.transport.Transport
DEFAULT_FETCH_THIN, DEFAULT_PUSH_THIN, local, REFSPEC_PUSH_ALL, REFSPEC_TAGS, uri
-
Fields inherited from interface org.eclipse.jgit.transport.TransportBundle
V2_BUNDLE_SIGNATURE
-
-
Constructor Summary
Constructors Constructor Description TransportBundleFile(Repository local, URIish uri, java.io.File bundlePath)
TransportBundleFile(URIish uri, java.io.File bundlePath)
Constructor for TransportBundleFile.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
FetchConnection
openFetch()
Begins a new connection for fetching from the remote repository.PushConnection
openPush()
Begins a new connection for pushing into the remote repository.-
Methods inherited from class org.eclipse.jgit.transport.Transport
applyConfig, fetch, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, getCredentialsProvider, getFilterBlobLimit, getFilterSpec, 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, push, push, register, setCheckFetchedObjects, setCredentialsProvider, setDryRun, setFetchThin, setFilterBlobLimit, setFilterSpec, setObjectChecker, setOptionReceivePack, setOptionUploadPack, setPackConfig, setPushAtomic, setPushOptions, setPushThin, setRemoveDeletedRefs, setTagOpt, setTimeout, unregister
-
-
-
-
Field Detail
-
PROTO_BUNDLE
static final TransportProtocol PROTO_BUNDLE
-
bundle
private final java.io.File bundle
-
-
Constructor Detail
-
TransportBundleFile
TransportBundleFile(Repository local, URIish uri, java.io.File bundlePath)
-
-
Method Detail
-
openFetch
public FetchConnection openFetch() throws NotSupportedException, TransportException
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 classTransport
- 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 classTransport
- 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 throwsException
. Implementers shouldn't throw checked exceptions. This override narrows the signature to prevent them from doing so.
-
-