org.eclipse.jgit.transport.UploadPack and
org.eclipse.jgit.transport.ReceivePack .
| Modifier and Type | Class and Description |
|---|---|
| public static class | RefAdvertiser.
Advertiser which frames lines in a |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Set | |
| private boolean | |
| pack-priv boolean | |
| private Repository | |
| private final Set | |
| private final Map | |
| private final char[] | |
| private final StringBuilder | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| private void | |
| public void | advertiseCapability(String
the name of a single protocol capability supported by the
caller. The set of capabilities are sent to the client in the
advertisement, allowing the client to later selectively enable
features it recognizes. name)Add one protocol capability to the initial advertisement. |
| public void | advertiseCapability(String
name of the capability. name, String value. If null the capability will not be added. value)Add one protocol capability with a value ( |
| public void | advertiseHave(AnyObjectId
identity of the object that is assumed to exist. id)Advertise one object is available using the magic |
| public void | advertiseId(AnyObjectId
the object to advertise. id, String name of the reference to advertise the object as, can be any
string not including the NUL byte. refName)Advertise one object under a specific name. |
| protected abstract void | |
| public void | init(Repository
the repository to read from. src)Initialize this advertiser with a repository for peeling tags. |
| public boolean | Returns: true if no advertisements have been sent yet.Whether no advertisements have been sent yet. |
| public Set | Returns: set of ObjectIds that were advertised to the client.zero or more refs to format for the client. The collection is
sorted before display if necessary, and therefore may appear
in any order. refs)Format an advertisement for the supplied refs. |
| public void | setDerefTags(boolean
true to show the dereferenced value of a tag as the special
ref deref)$tag^{} ; false to omit it from the output.Toggle tag peeling. |
| public void | setUseProtocolV2(boolean
true if this advertiser should advertise using the protocol v2
format, false otherwise b)Set whether this advertiser should use protocol v2 |
| protected abstract void | writeOne(CharSequence
the advertisement line to be written. The line always ends
with LF. Never null or the empty string. line)Write a single advertisement line. |
| capablities | back to summary |
|---|---|
| pack-priv final Set<String> capablities | |
| derefTags | back to summary |
|---|---|
| private boolean derefTags | |
| first | back to summary |
|---|---|
| pack-priv boolean first | |
| repository | back to summary |
|---|---|
| private Repository repository | |
| sent | back to summary |
|---|---|
| private final Set<ObjectId> sent | |
| symrefs | back to summary |
|---|---|
| private final Map<String, String> symrefs | |
| tmpId | back to summary |
|---|---|
| private final char[] tmpId | |
| tmpLine | back to summary |
|---|---|
| private final StringBuilder tmpLine | |
| useProtocolV2 | back to summary |
|---|---|
| private boolean useProtocolV2 | |
| RefAdvertiser | back to summary |
|---|---|
| public RefAdvertiser() | |
| addSymref | back to summary |
|---|---|
| public void addSymref(String from, String to) Add a symbolic ref to capabilities. This method must be invoked prior to any of the following: | |
| advertiseAny | back to summary |
|---|---|
| private void advertiseAny(AnyObjectId obj, String refName) throws IOException | |
| advertiseAnyOnce | back to summary |
|---|---|
| private void advertiseAnyOnce(AnyObjectId obj, String refName) throws IOException | |
| advertiseCapability | back to summary |
|---|---|
| public void advertiseCapability(String name) Add one protocol capability to the initial advertisement. This method must be invoked prior to any of the following:
| |
| advertiseCapability | back to summary |
|---|---|
| public void advertiseCapability(String name, String value) Add one protocol capability with a value ( | |
| advertiseHave | back to summary |
|---|---|
| public void advertiseHave(AnyObjectId id) throws IOException Advertise one object is available using the magic
The magic
| |
| advertiseId | back to summary |
|---|---|
| public void advertiseId(AnyObjectId id, String refName) throws IOException Advertise one object under a specific name. If the advertised object is a tag, this method does not advertise the peeled version of it.
| |
| end | back to summary |
|---|---|
| protected abstract void end() throws IOException Mark the end of the advertisements.
| |
| init | back to summary |
|---|---|
| public void init(Repository src) Initialize this advertiser with a repository for peeling tags.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Whether no advertisements have been sent yet.
| |
| send | back to summary |
|---|---|
| public Set Format an advertisement for the supplied refs.
| |
| setDerefTags | back to summary |
|---|---|
| public void setDerefTags(boolean deref) Toggle tag peeling. This method must be invoked prior to any of the following:
| |
| setUseProtocolV2 | back to summary |
|---|---|
| public void setUseProtocolV2(boolean b) Set whether this advertiser should use protocol v2
| |
| writeOne | back to summary |
|---|---|
| protected abstract void writeOne(CharSequence line) throws IOException Write a single advertisement line.
| |
PacketLineOut format.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private ByteBuffer | |
| private char[] | |
| private CharBuffer | |
| private final PacketLineOut | |
| private final CharsetEncoder |
| Access | Constructor and Description |
|---|---|
| public | PacketLineOutRefAdvertiser(PacketLineOut
the output stream. out)Create a new advertiser for the supplied stream. |
| Modifier and Type | Method and Description |
|---|---|
| public void | advertiseId(AnyObjectId
the object to advertise. id, String name of the reference to advertise the object as, can be any
string not including the NUL byte. refName)Overrides org. Advertise one object under a specific name. |
| private void | |
| private void | |
| protected void | end()
Implements abstract org. Mark the end of the advertisements. |
| private void | |
| protected void | writeOne(CharSequence
the advertisement line to be written. The line always ends
with LF. Never null or the empty string. line)Implements abstract org. Write a single advertisement line. |
| binArr | back to summary |
|---|---|
| private byte[] binArr | |
| binBuf | back to summary |
|---|---|
| private ByteBuffer binBuf | |
| chArr | back to summary |
|---|---|
| private char[] chArr | |
| chBuf | back to summary |
|---|---|
| private CharBuffer chBuf | |
| pckOut | back to summary |
|---|---|
| private final PacketLineOut pckOut | |
| utf8 | back to summary |
|---|---|
| private final CharsetEncoder utf8 | |
| PacketLineOutRefAdvertiser | back to summary |
|---|---|
| public PacketLineOutRefAdvertiser(PacketLineOut out) Create a new advertiser for the supplied stream.
| |
| advertiseId | back to summary |
|---|---|
| public void advertiseId(AnyObjectId id, String refName) throws IOException Overrides org. Doc from org. Advertise one object under a specific name. If the advertised object is a tag, this method does not advertise the peeled version of it.
| |
| append | back to summary |
|---|---|
| private void append(String str) throws CharacterCodingException | |
| append | back to summary |
|---|---|
| private void append(int b) | |
| end | back to summary |
|---|---|
| protected void end() throws IOException Implements abstract org. Doc from org. Mark the end of the advertisements.
| |
| grow | back to summary |
|---|---|
| private void grow() | |
| writeOne | back to summary |
|---|---|
| protected void writeOne(CharSequence line) throws IOException Implements abstract org. Doc from org. Write a single advertisement line.
| |