java.lang.Object
org.eclipse.jgit.internal.transport.parser.FirstWant
In the pack negotiation phase (protocol v0/v1), the client sends a list of
wants. The first "want" line is special, as it (can) have a list of
capabilities appended.
E.g. "want oid cap1 cap2 cap3"
Do not confuse this line with the first one in the reference advertisement,
which is sent by the server, looks like
"b8f7c471373b8583ced0025cfad8c9916c484b76 HEAD\0 cap1 cap2 cap3" and is
parsed by the BasePackConnection.readAdvertisedRefs method.
This class parses the input want line and holds the results: the actual want
line and the capabilities.
-
Method Summary
-
Method Details
-
fromLine
Parse the first want line in the protocol v0/v1 pack negotiation.- Parameters:
line
- line from the client.- Returns:
- an instance of FirstWant
- Throws:
PackProtocolException
- if the line doesn't follow the protocol format.
-
getLine
Get line- Returns:
- non-capabilities part of the line.
-
getCapabilities
Get capabilities- Returns:
- capabilities parsed from the line as an immutable set (excluding agent and session-id).
-
getAgent
Get agent- Returns:
- client user agent parsed from the line.
-
getClientSID
Get client session-id- Returns:
- client session-id parsed from the line.
-