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

public final Class LsRefsV2Request

extends Object
Class Inheritance
Static Imports
java.util.Objects.requireNonNull

ls-refs protocol v2 request.

This is used as an input to ProtocolV2Hook.

Since
5.1

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final boolean
private final List<String>
private final List<String>
private final boolean

Constructor Summary

AccessConstructor and Description
private
LsRefsV2Request(List<String> refPrefixes, boolean symrefs, boolean peel, String agent, List<String> serverOptions, String clientSID)

Method Summary

Modifier and TypeMethod and Description
public static LsRefsV2Request.Builder

Returns:

A builder of LsRefsV2Request.
builder
()

Create builder

public String

Returns:

agent as reported by the client
getAgent
()

Get agent reported by the client

public String

Returns:

session-id as reported by the client
getClientSID
()

Get session-id reported by the client

public boolean

Returns:

true if the client requests tags to be peeled.
getPeel
()

Whether the client requests tags to be peeled

public List<String>

Returns:

ref prefixes that the client requested.
getRefPrefixes
()

Get ref prefixes

public List<String>

Returns:

application-specific options from the client as an unmodifiable list
getServerOptions
()

Get application-specific options provided by the client using --server-option.

public boolean

Returns:

true if the client requests symbolic references.
getSymrefs
()

Whether the client requests symbolic references

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

agentback to summary
private final String agent
Annotations
@Nullable
clientSIDback to summary
private final String clientSID
peelback to summary
private final boolean peel
refPrefixesback to summary
private final List<String> refPrefixes
serverOptionsback to summary
private final List<String> serverOptions
Annotations
@NonNull
symrefsback to summary
private final boolean symrefs

Constructor Detail

LsRefsV2Requestback to summary
private LsRefsV2Request(List<String> refPrefixes, boolean symrefs, boolean peel, String agent, List<String> serverOptions, String clientSID)

Method Detail

builderback to summary
public static LsRefsV2Request.Builder builder()

Create builder

Returns:LsRefsV2Request.Builder

A builder of LsRefsV2Request.

getAgentback to summary
public String getAgent()

Get agent reported by the client

Returns:String

agent as reported by the client

Annotations
@Nullable
Since
5.2
getClientSIDback to summary
public String getClientSID()

Get session-id reported by the client

Returns:String

session-id as reported by the client

Annotations
@Nullable
Since
6.4
getPeelback to summary
public boolean getPeel()

Whether the client requests tags to be peeled

Returns:boolean

true if the client requests tags to be peeled.

getRefPrefixesback to summary
public List<String> getRefPrefixes()

Get ref prefixes

Returns:List<String>

ref prefixes that the client requested.

getServerOptionsback to summary
public List<String> getServerOptions()

Get application-specific options provided by the client using --server-option.

It returns just the content, without the "server-option=" prefix. E.g. a request with server-option=A and server-option=B lines returns the list [A, B].

Returns:List<String>

application-specific options from the client as an unmodifiable list

Annotations
@NonNull
Since
5.2
getSymrefsback to summary
public boolean getSymrefs()

Whether the client requests symbolic references

Returns:boolean

true if the client requests symbolic references.

org.eclipse.jgit.transport back to summary

public final Class LsRefsV2Request.Builder

extends Object
Class Inheritance

A builder for LsRefsV2Request.

Field Summary

Modifier and TypeField and Description
private String
private String
private boolean
private List<String>
private final List<String>
private boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public LsRefsV2Request.Builder

Returns:

this builder
addServerOption
(String
the client-supplied server-option capability, without leading "server-option=".
value
)

Records an application-specific option supplied in a server-option line, for later retrieval with LsRefsV2Request#getServerOptions.

public LsRefsV2Request

Returns:

LsRefsV2Request the request
build
()

Builds the request

public LsRefsV2Request.Builder

Returns:

this builder
setAgent
(String
the client-supplied agent capability, without leading "agent="
value
)

Value of an agent line received after the command and before the arguments.

public LsRefsV2Request.Builder

Returns:

this builder
setClientSID
(String
the client-supplied session-id capability, without leading "session-id="
value
)

Value of a session-id line received after the command and before the arguments.

public LsRefsV2Request.Builder

Returns:

the Builder
setPeel
(boolean
of peel
value
)

Set whether to peel tags

public LsRefsV2Request.Builder

Returns:

the Builder
setRefPrefixes
(List<String>
ref prefix values
value
)

Set ref prefixes

public LsRefsV2Request.Builder

Returns:

the Builder
setSymrefs
(boolean
of symrefs
value
)

Set symrefs

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

agentback to summary
private String agent
clientSIDback to summary
private String clientSID
peelback to summary
private boolean peel
refPrefixesback to summary
private List<String> refPrefixes
serverOptionsback to summary
private final List<String> serverOptions
symrefsback to summary
private boolean symrefs

Constructor Detail

Builderback to summary
private Builder()

Method Detail

addServerOptionback to summary
public LsRefsV2Request.Builder addServerOption(String value)

Records an application-specific option supplied in a server-option line, for later retrieval with LsRefsV2Request#getServerOptions.

Parameters
value:String

the client-supplied server-option capability, without leading "server-option=".

Returns:LsRefsV2Request.Builder

this builder

Since
5.2
buildback to summary
public LsRefsV2Request build()

Builds the request

Returns:LsRefsV2Request

LsRefsV2Request the request

setAgentback to summary
public LsRefsV2Request.Builder setAgent(String value)

Value of an agent line received after the command and before the arguments. E.g. "agent=a.b.c/1.0" should set "a.b.c/1.0".

Parameters
value:String

the client-supplied agent capability, without leading "agent="

Returns:LsRefsV2Request.Builder

this builder

Since
5.2
setClientSIDback to summary
public LsRefsV2Request.Builder setClientSID(String value)

Value of a session-id line received after the command and before the arguments. E.g. "session-id=a.b.c" should set "a.b.c".

Parameters
value:String

the client-supplied session-id capability, without leading "session-id="

Returns:LsRefsV2Request.Builder

this builder

Since
6.4
setPeelback to summary
public LsRefsV2Request.Builder setPeel(boolean value)

Set whether to peel tags

Parameters
value:boolean

of peel

Returns:LsRefsV2Request.Builder

the Builder

setRefPrefixesback to summary
public LsRefsV2Request.Builder setRefPrefixes(List<String> value)

Set ref prefixes

Parameters
value:List<String>

ref prefix values

Returns:LsRefsV2Request.Builder

the Builder

setSymrefsback to summary
public LsRefsV2Request.Builder setSymrefs(boolean value)

Set symrefs

Parameters
value:boolean

of symrefs

Returns:LsRefsV2Request.Builder

the Builder