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:
java.lang.AutoCloseable
,Connection
,FetchConnection
- Enclosing class:
- TransportHttp
class TransportHttp.SmartHttpFetchConnection extends BasePackFetchConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.BasePackFetchConnection
BasePackFetchConnection.FetchConfig
-
-
Field Summary
Fields Modifier and Type Field Description private TransportHttp.MultiRequestService
svc
-
Fields 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
Constructors Constructor Description SmartHttpFetchConnection(java.io.InputStream advertisement)
SmartHttpFetchConnection(java.io.InputStream advertisement, java.util.Collection<RefSpec> refSpecs, java.lang.String... additionalPatterns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doFetch(ProgressMonitor monitor, java.util.Collection<Ref> want, java.util.Set<ObjectId> have, java.io.OutputStream outputStream)
Execute common ancestor negotiation and fetch the objects.protected void
onReceivePack()
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 Detail
-
svc
private TransportHttp.MultiRequestService svc
-
-
Constructor Detail
-
SmartHttpFetchConnection
SmartHttpFetchConnection(java.io.InputStream advertisement) throws TransportException
- Throws:
TransportException
-
SmartHttpFetchConnection
SmartHttpFetchConnection(java.io.InputStream advertisement, java.util.Collection<RefSpec> refSpecs, java.lang.String... additionalPatterns) throws TransportException
- Throws:
TransportException
-
-
Method Detail
-
doFetch
protected void doFetch(ProgressMonitor monitor, java.util.Collection<Ref> want, java.util.Set<ObjectId> have, java.io.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
-
-