Top Description Inners Fields Constructors Methods
org.eclipse.jgit.transport

pack-priv Class TransportGitAnon

extends TcpTransport
implements PackTransport
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.transport.PackTransport
Imports
java.io.BufferedInputStream, .BufferedOutputStream, .IOException, .InputStream, .OutputStream, java.net.ConnectException, .InetAddress, .InetSocketAddress, .Socket, .UnknownHostException, java.util.Collection, .Collections, .EnumSet, .Set, org.eclipse.jgit.errors.NotSupportedException, .TransportException, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.lib.Repository

Transport through a git-daemon waiting for anonymous TCP connections.

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final TransportProtocol

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements abstract org.eclipse.jgit.transport.Transport.close.

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

pack-priv Socket
public FetchConnection
openFetch()

Implements abstract org.eclipse.jgit.transport.Transport.openFetch.

Begins a new connection for fetching from the remote repository.

public FetchConnection
openFetch(Collection<RefSpec> refSpecs, String...
that will be set as ref prefixes if the server supports git protocol V2; null values are ignored
additionalPatterns
)

Overrides org.eclipse.jgit.transport.Transport.openFetch.

Begins a new connection for fetching from the remote repository.

public PushConnection
openPush()

Implements abstract org.eclipse.jgit.transport.Transport.openPush.

Begins a new connection for pushing into the remote repository.

pack-priv void

Field Detail

GIT_PORTback to summary
pack-priv static final int GIT_PORT
PROTO_GITback to summary
pack-priv static final TransportProtocol PROTO_GIT

Constructor Detail

TransportGitAnonback to summary
pack-priv TransportGitAnon(Repository local, URIish uri)
TransportGitAnonback to summary
pack-priv TransportGitAnon(URIish uri)

Method Detail

closeback to summary
public void close()

Implements abstract org.eclipse.jgit.transport.Transport.close.

Implements java.lang.AutoCloseable.close.

Doc from org.eclipse.jgit.transport.Transport.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

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.

Annotations
@Override
openConnectionback to summary
pack-priv Socket openConnection() throws TransportException
openFetchback to summary
public FetchConnection openFetch() throws TransportException

Implements abstract org.eclipse.jgit.transport.Transport.openFetch.

Doc from org.eclipse.jgit.transport.Transport.openFetch.

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.

Returns:FetchConnection

a fresh connection to fetch from the remote repository.

Annotations
@Override
Exceptions
TransportException:
the remote connection could not be established.
openFetchback to summary
public FetchConnection openFetch(Collection<RefSpec> refSpecs, String... additionalPatterns) throws NotSupportedException, TransportException

Overrides org.eclipse.jgit.transport.Transport.openFetch.

Doc from org.eclipse.jgit.transport.Transport.openFetch.

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.

If the server supports git protocol V2, the RefSpecs and the additional patterns, if any, are used to restrict the server's ref advertisement to matching refs only.

Transports that want to support git protocol V2 must override this; the default implementation ignores its arguments and calls openFetch().

Parameters
refSpecs:Collection<RefSpec>

that will be fetched via FetchConnection#fetch(ProgressMonitor, Collection, java.util.Set, OutputStream) later

additionalPatterns:String[]

that will be set as ref prefixes if the server supports git protocol V2; null values are ignored

Returns:FetchConnection

a fresh connection to fetch from the remote repository.

Annotations
@Override
Exceptions
NotSupportedException:
the implementation does not support fetching.
TransportException:
the remote connection could not be established.
openPushback to summary
public PushConnection openPush() throws TransportException

Implements abstract org.eclipse.jgit.transport.Transport.openPush.

Doc from org.eclipse.jgit.transport.Transport.openPush.

Begins a new connection for pushing into the remote repository.

Returns:PushConnection

a fresh connection to push into the remote repository.

Annotations
@Override
Exceptions
TransportException:
the remote connection could not be established
serviceback to summary
pack-priv void service(String name, PacketLineOut pckOut, TransferConfig.ProtocolVersion gitProtocol) throws IOException
org.eclipse.jgit.transport back to summary

pack-priv Class TransportGitAnon.TcpFetchConnection

extends BasePackFetchConnection
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Socket
Inherited from org.eclipse.jgit.transport.BasePackFetchConnection:
ADVERTISEDCOMMONMIN_CLIENT_BUFFEROPTION_ALLOW_REACHABLE_SHA1_IN_WANTOPTION_ALLOW_TIP_SHA1_IN_WANTOPTION_FILTEROPTION_INCLUDE_TAGOPTION_MULTI_ACKOPTION_MULTI_ACK_DETAILEDOPTION_NO_DONEOPTION_NO_PROGRESSOPTION_OFS_DELTAOPTION_SHALLOWOPTION_SIDE_BANDOPTION_SIDE_BAND_64KOPTION_THIN_PACKREACHABLE

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
TcpFetchConnection(Collection<RefSpec> refSpecs, String... additionalPatterns)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides org.eclipse.jgit.transport.BasePackFetchConnection.close.

Implements org.eclipse.jgit.transport.Connection.close.

Closes this resource, relinquishing any underlying resources.

Inherited from org.eclipse.jgit.transport.BasePackFetchConnection:
didFetchIncludeTagsdidFetchTestConnectivitydoFetchfetchfetchgetFetchConfiggetPackLocksonReceivePacksetPackLockMessage

Field Detail

sockback to summary
private Socket sock

Constructor Detail

TcpFetchConnectionback to summary
pack-priv TcpFetchConnection() throws TransportException
TcpFetchConnectionback to summary
pack-priv TcpFetchConnection(Collection<RefSpec> refSpecs, String... additionalPatterns) throws TransportException

Method Detail

closeback to summary
public void close()

Overrides org.eclipse.jgit.transport.BasePackFetchConnection.close.

Implements org.eclipse.jgit.transport.Connection.close.

Doc from org.eclipse.jgit.transport.Connection.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

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 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.

Annotations
@Override
org.eclipse.jgit.transport back to summary

pack-priv Class TransportGitAnon.TcpPushConnection

extends BasePackPushConnection
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Socket
Inherited from org.eclipse.jgit.transport.BasePackPushConnection:
CAPABILITY_DELETE_REFSCAPABILITY_OFS_DELTACAPABILITY_PUSH_OPTIONSCAPABILITY_REPORT_STATUSCAPABILITY_SIDE_BAND_64K

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides org.eclipse.jgit.transport.BasePackConnection.close.

Implements org.eclipse.jgit.transport.Connection.close.

Closes this resource, relinquishing any underlying resources.

Inherited from org.eclipse.jgit.transport.BasePackPushConnection:
doPushgetPushOptionsisUseBitmapsnoRepositorypushpush

Field Detail

sockback to summary
private Socket sock

Constructor Detail

TcpPushConnectionback to summary
pack-priv TcpPushConnection() throws TransportException

Method Detail

closeback to summary
public void close()

Overrides org.eclipse.jgit.transport.BasePackConnection.close.

Implements org.eclipse.jgit.transport.Connection.close.

Doc from org.eclipse.jgit.transport.Connection.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

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 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.

Annotations
@Override