private class TestProtocol.TransportInternal extends Transport implements PackTransport
Transport.Operation
Modifier and Type | Field and Description |
---|---|
private TestProtocol.Handle |
handle |
DEFAULT_FETCH_THIN, DEFAULT_PUSH_THIN, local, REFSPEC_PUSH_ALL, REFSPEC_TAGS, uri
Constructor and Description |
---|
TransportInternal(Repository local,
URIish uri,
TestProtocol.Handle handle) |
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
private final TestProtocol.Handle handle
TransportInternal(Repository local, URIish uri, TestProtocol.Handle handle)
public FetchConnection openFetch() throws NotSupportedException, TransportException
Transport
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, TransportException
Transport
openPush
in class Transport
NotSupportedException
- the implementation does not support pushing.TransportException
- the remote connection could not be establishedpublic void close()
Transport
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.