Package org.eclipse.jgit.transport
Class TransportHttp.SmartHttpFetchConnection
java.lang.Object
org.eclipse.jgit.transport.BaseConnection
org.eclipse.jgit.transport.BasePackConnection
org.eclipse.jgit.transport.BasePackFetchConnection
org.eclipse.jgit.transport.TransportHttp.SmartHttpFetchConnection
- All Implemented Interfaces:
AutoCloseable
,Connection
,FetchConnection
- Enclosing class:
- TransportHttp
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.BasePackFetchConnection
BasePackFetchConnection.FetchConfig
-
Field Summary
FieldsFields inherited from class org.eclipse.jgit.transport.BasePackFetchConnection
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
Fields inherited from class org.eclipse.jgit.transport.BasePackConnection
additionalHaves, CAPABILITY_SYMREF_PREFIX, in, local, out, outNeedsEnd, pckIn, pckOut, statelessRPC, timeoutIn, timeoutOut, transport, uri
-
Constructor Summary
ConstructorsConstructorDescriptionSmartHttpFetchConnection
(InputStream advertisement) SmartHttpFetchConnection
(InputStream advertisement, Collection<RefSpec> refSpecs, String... additionalPatterns) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doFetch
(ProgressMonitor monitor, Collection<Ref> want, Set<ObjectId> have, OutputStream outputStream) Execute common ancestor negotiation and fetch the objects.protected void
Notification event delivered just before the pack is received from the network.Methods inherited from class org.eclipse.jgit.transport.BasePackFetchConnection
close, didFetchIncludeTags, didFetchTestConnectivity, fetch, fetch, getFetchConfig, getPackLocks, setPackLockMessage
Methods inherited from class org.eclipse.jgit.transport.BasePackConnection
addUserAgentCapability, endOut, getCapability, getPeerUserAgent, getProtocolVersion, init, isCapableOf, lsRefs, noRepository, readAdvertisedRefs, setProtocolVersion, updateWithSymRefs, wantCapability
Methods inherited from class org.eclipse.jgit.transport.BaseConnection
available, getMessages, getMessageWriter, getRef, getRefs, getRefsMap, markStartedOperation, setMessageWriter, setPeerUserAgent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jgit.transport.Connection
getMessages, getPeerUserAgent, getRef, getRefs, getRefsMap
-
Field Details
-
svc
-
-
Constructor Details
-
SmartHttpFetchConnection
SmartHttpFetchConnection(InputStream advertisement) throws TransportException - Throws:
TransportException
-
SmartHttpFetchConnection
SmartHttpFetchConnection(InputStream advertisement, Collection<RefSpec> refSpecs, String... additionalPatterns) throws TransportException - Throws:
TransportException
-
-
Method Details
-
doFetch
protected void doFetch(ProgressMonitor monitor, Collection<Ref> want, Set<ObjectId> have, OutputStream outputStream) throws TransportException Description copied from class:BasePackFetchConnection
Execute common ancestor negotiation and fetch the objects.- Overrides:
doFetch
in classBasePackFetchConnection
- Parameters:
monitor
- progress monitor to receive status updates. If the monitor is theNullProgressMonitor.INSTANCE
, then the no-progress option enabled.want
- the advertised remote references the caller wants to fetch.have
- additional objects to assume that already exist locally. This will be added to the set of objects reachable from the destination repository's references.outputStream
- ouputStream to write sideband messages to- Throws:
TransportException
- if any exception occurs.
-
onReceivePack
protected void onReceivePack()Description copied from class:BasePackFetchConnection
Notification event delivered just before the pack is received from the network. This event can be used by RPC such asTransportHttp
to disable its request magic and ensure the pack stream is read correctly.- Overrides:
onReceivePack
in classBasePackFetchConnection
-