- All Implemented Interfaces:
AutoCloseable
,WalkTransport
This transport communicates with the Amazon S3 servers (a non-free commercial hosting service that users must subscribe to). Some users may find transport to and from S3 to be a useful backup service.
The transport does not require any specialized Git support on the remote (server side) repository, as Amazon does not provide any such support. Repository files are retrieved directly through the S3 API, which uses extended HTTP/1.1 semantics. This make it possible to read or write Git data from a remote repository that is stored on S3.
Unlike the HTTP variant (see
TransportHttp
) we rely upon being able to
list objects in a bucket, as the S3 API supports this function. By listing
the bucket contents we can avoid relying on objects/info/packs
or info/refs
in the remote repository.
Concurrent pushing over this transport is not supported. Multiple concurrent push operations may cause confusion in the repository state.
- See Also:
-
WalkFetchConnection
WalkPushConnection
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.Transport
Transport.Operation
-
Field Summary
Fields inherited from class org.eclipse.jgit.transport.HttpTransport
connectionFactory
Fields inherited from class org.eclipse.jgit.transport.Transport
DEFAULT_FETCH_THIN, DEFAULT_PUSH_THIN, DEFAULT_PUSH_USE_BITMAPS, local, REFSPEC_PUSH_ALL, REFSPEC_TAGS, uri
-
Method Summary
Methods inherited from class org.eclipse.jgit.transport.HttpTransport
getConnectionFactory, setConnectionFactory
Methods inherited from class org.eclipse.jgit.transport.Transport
applyConfig, fetch, fetch, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, getCredentialsProvider, getDeepenNots, getDeepenSince, getDepth, getFilterBlobLimit, getFilterSpec, getObjectChecker, getOptionReceivePack, getOptionUploadPack, getPackConfig, getPushOptions, getTagOpt, getTimeout, getTransportProtocols, getURI, isCheckFetchedObjects, isDryRun, isFetchThin, isPushAtomic, isPushThin, isPushUseBitmaps, isRemoveDeletedRefs, open, open, open, open, open, open, open, openAll, openAll, openAll, openAll, openFetch, push, push, register, setCheckFetchedObjects, setCredentialsProvider, setDeepenNots, setDeepenSince, setDepth, setDepth, setDryRun, setFetchThin, setFilterBlobLimit, setFilterSpec, setHookErrorStream, setHookOutputStream, setObjectChecker, setOptionReceivePack, setOptionUploadPack, setPackConfig, setPushAtomic, setPushOptions, setPushThin, setPushUseBitmaps, setRemoveDeletedRefs, setTagOpt, setTimeout, unregister
-
Method Details
-
openFetch
Description copied from class:Transport
Begins a new connection for fetching from the remote repository.If the transport has no local repository, the fetch connection can only be used for reading remote refs.
- Specified by:
openFetch
in classTransport
- Returns:
- a fresh connection to fetch from the remote repository.
- Throws:
TransportException
- the remote connection could not be established.
-
openPush
Description copied from class:Transport
Begins a new connection for pushing into the remote repository.- Specified by:
openPush
in classTransport
- Returns:
- a fresh connection to push into the remote repository.
- Throws:
TransportException
- the remote connection could not be established
-
close
public void close()Description copied from class: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 throwsException
. Implementers shouldn't throw checked exceptions. This override narrows the signature to prevent them from doing so.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classTransport
-