On HTTP transports this user agent string is always supplied by the JGit
client in the User-Agent HTTP header.
On native transports this user agent string is always sent when JGit is a server. When JGit is a client the user agent string will be supplied to the remote server only if the remote server advertises its own agent identity.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static String | |
| private static String | |
| private static String | |
| public static String | Returns: a string similar to"JGit/4.0"; null if the agent has
been cleared and should not be shared with a peer.Get the user agent string advertised by JGit. |
| public static void |
| userAgent | back to summary |
|---|---|
| private static volatile String userAgent | |
| UserAgent | back to summary |
|---|---|
| private UserAgent() | |
| clean | back to summary |
|---|---|
| pack-priv static String clean(String s) | |
| computeUserAgent | back to summary |
|---|---|
| private static String computeUserAgent() | |
| computeVersion | back to summary |
|---|---|
| private static String computeVersion() | |
| get | back to summary |
|---|---|
| public static String get() Get the user agent string advertised by JGit.
| |
| set | back to summary |
|---|---|
| public static void set(String agent) Change the user agent string advertised by JGit.
The new string should start with
Spaces and other whitespace should be avoided as these will be
automatically converted to User agent strings are restricted to printable ASCII.
| |