class TransportBundleFile extends Transport implements TransportBundle
Transport.Operation
Modifier and Type | Field and Description |
---|---|
private java.io.File |
bundle |
(package private) static TransportProtocol |
PROTO_BUNDLE |
DEFAULT_FETCH_THIN, DEFAULT_PUSH_THIN, local, REFSPEC_PUSH_ALL, REFSPEC_TAGS, uri
V2_BUNDLE_SIGNATURE
Constructor and Description |
---|
TransportBundleFile(Repository local,
URIish uri,
java.io.File bundlePath) |
TransportBundleFile(URIish uri,
java.io.File bundlePath)
Constructor for TransportBundleFile.
|
Modifier and Type | Method and 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.
|
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
static final TransportProtocol PROTO_BUNDLE
private final java.io.File bundle
TransportBundleFile(Repository local, URIish uri, java.io.File bundlePath)
public FetchConnection openFetch() throws NotSupportedException, TransportException
If the transport has no local repository, the fetch connection can only be used for reading remote refs.
openFetch
in class Transport
NotSupportedException
- the implementation does not support fetching.TransportException
- the remote connection could not be established.public PushConnection openPush() throws NotSupportedException
openPush
in class Transport
NotSupportedException
- the implementation does not support pushing.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.