class InternalFetchConnection<C> extends BasePackFetchConnection
BasePackFetchConnection.FetchConfig
Modifier and Type | Field and Description |
---|---|
private java.lang.Thread |
worker |
ADVERTISED, COMMON, MIN_CLIENT_BUFFER, OPTION_ALLOW_REACHABLE_SHA1_IN_WANT, OPTION_ALLOW_TIP_SHA1_IN_WANT, OPTION_FILTER, OPTION_INCLUDE_TAG, OPTION_MULTI_ACK, OPTION_MULTI_ACK_DETAILED, OPTION_NO_DONE, OPTION_NO_PROGRESS, OPTION_OFS_DELTA, OPTION_SHALLOW, OPTION_SIDE_BAND, OPTION_SIDE_BAND_64K, OPTION_THIN_PACK, REACHABLE
additionalHaves, in, local, out, outNeedsEnd, pckIn, pckOut, statelessRPC, timeoutIn, timeoutOut, transport, uri
Constructor and Description |
---|
InternalFetchConnection(PackTransport transport,
UploadPackFactory<C> uploadPackFactory,
C req,
Repository remote)
Constructor for InternalFetchConnection.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
didFetchIncludeTags, didFetchTestConnectivity, doFetch, fetch, fetch, getFetchConfig, getPackLocks, onReceivePack, setPackLockMessage
addUserAgentCapability, endOut, getPeerUserAgent, init, isCapableOf, noRepository, readAdvertisedRefs, wantCapability
available, getMessages, getMessageWriter, getRef, getRefs, getRefsMap, markStartedOperation, setMessageWriter, setPeerUserAgent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessages, getPeerUserAgent, getRef, getRefs, getRefsMap
public InternalFetchConnection(PackTransport transport, UploadPackFactory<C> uploadPackFactory, C req, Repository remote) throws TransportException
transport
- a PackTransport
uploadPackFactory
- a
UploadPackFactory
req
- requestremote
- the remote Repository
TransportException
- if any.public void close()
Close any resources used by this connection.
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.
If additional messages were produced by the remote peer, these should
still be retained in the connection instance for Connection.getMessages()
.
AutoClosable.close()
declares that it throws Exception
.
Implementers shouldn't throw checked exceptions. This override narrows
the signature to prevent them from doing so.
close
in interface java.lang.AutoCloseable
close
in interface Connection
close
in class BasePackFetchConnection