class TransportGitAnon extends TcpTransport implements PackTransport
This transport supports the git://
protocol, usually run on
the IANA registered port 9418. It is a popular means for distributing open
source projects, as there are no authentication or authorization overheads.
Modifier and Type | Class and Description |
---|---|
(package private) class |
TransportGitAnon.TcpFetchConnection |
(package private) class |
TransportGitAnon.TcpPushConnection |
Transport.Operation
Modifier and Type | Field and Description |
---|---|
(package private) static int |
GIT_PORT |
(package private) static TransportProtocol |
PROTO_GIT |
DEFAULT_FETCH_THIN, DEFAULT_PUSH_THIN, local, REFSPEC_PUSH_ALL, REFSPEC_TAGS, uri
Constructor and Description |
---|
TransportGitAnon(Repository local,
URIish uri) |
TransportGitAnon(URIish uri) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
(package private) java.net.Socket |
openConnection() |
FetchConnection |
openFetch()
Begins a new connection for fetching from the remote repository.
|
PushConnection |
openPush()
Begins a new connection for pushing into the remote repository.
|
(package private) void |
service(java.lang.String name,
PacketLineOut pckOut) |
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
static final int GIT_PORT
static final TransportProtocol PROTO_GIT
TransportGitAnon(Repository local, URIish uri)
TransportGitAnon(URIish uri)
public FetchConnection openFetch() throws TransportException
If the transport has no local repository, the fetch connection can only be used for reading remote refs.
openFetch
in class Transport
TransportException
- the remote connection could not be established.public PushConnection openPush() throws TransportException
openPush
in class Transport
TransportException
- the remote connection could not be establishedpublic void close()
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.
java.net.Socket openConnection() throws TransportException
TransportException
void service(java.lang.String name, PacketLineOut pckOut) throws java.io.IOException
java.io.IOException