public abstract class OperationResult
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.util.Map<java.lang.String,Ref> |
advertisedRefs |
(package private) java.lang.StringBuilder |
messageBuffer |
(package private) java.lang.String |
peerUserAgent |
(package private) java.util.SortedMap<java.lang.String,TrackingRefUpdate> |
updates |
(package private) URIish |
uri |
Constructor and Description |
---|
OperationResult() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
add(TrackingRefUpdate u) |
(package private) void |
addMessages(java.lang.String msg) |
Ref |
getAdvertisedRef(java.lang.String name)
Get a single advertised ref by name.
|
java.util.Collection<Ref> |
getAdvertisedRefs()
Get the complete list of refs advertised by the remote.
|
java.lang.String |
getMessages()
Get the additional messages, if any, returned by the remote process.
|
java.lang.String |
getPeerUserAgent()
Get the user agent advertised by the peer server, if available.
|
TrackingRefUpdate |
getTrackingRefUpdate(java.lang.String localName)
Get the status for a specific local tracking ref update.
|
java.util.Collection<TrackingRefUpdate> |
getTrackingRefUpdates()
Get the status of all local tracking refs that were updated.
|
URIish |
getURI()
Get the URI this result came from.
|
(package private) void |
setAdvertisedRefs(URIish u,
java.util.Map<java.lang.String,Ref> ar) |
java.util.Map<java.lang.String,Ref> advertisedRefs
URIish uri
final java.util.SortedMap<java.lang.String,TrackingRefUpdate> updates
java.lang.StringBuilder messageBuffer
java.lang.String peerUserAgent
public URIish getURI()
Each transport instance connects to at most one URI at any point in time.
public java.util.Collection<Ref> getAdvertisedRefs()
The returned refs may appear in any order. If the caller needs these to be sorted, they should be copied into a new array or List and then sorted by the caller as necessary.
public final Ref getAdvertisedRef(java.lang.String name)
The name supplied should be valid ref name. To get a peeled value for a
ref (aka refs/tags/v1.0^{}
) use the base name (without
the ^{}
suffix) and look at the peeled object id.
name
- name of the ref to obtain.public java.util.Collection<TrackingRefUpdate> getTrackingRefUpdates()
public TrackingRefUpdate getTrackingRefUpdate(java.lang.String localName)
localName
- name of the local ref (e.g. "refs/remotes/origin/master").void add(TrackingRefUpdate u)
public java.lang.String getMessages()
These messages are most likely informational or error messages, sent by the remote peer, to help the end-user correct any problems that may have prevented the operation from completing successfully. Application UIs should try to show these in an appropriate context.
void addMessages(java.lang.String msg)
public java.lang.String getPeerUserAgent()
"JGit/4.0"
. Null if the peer
did not advertise version information.