T
- Represents the implementation type. Allows a consistent builder interface throughout the request
hierarchy. Parameterize concrete subclasses with their own type and implement me()
to return
"this". In abstract subclasses, return me() in builder methods.public abstract class ListRequest<T extends ListRequest<T>> extends Request
Modifier and Type | Field and Description |
---|---|
protected int |
limit |
protected java.lang.String |
token |
Constructor and Description |
---|
ListRequest() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.List<java.lang.Object>> |
generateHeaders()
Returns the HTTP headers to send in this request, to be generated from other request properties immediately
before sending.
|
int |
getLimit()
Gets the limit (page size) for this request.
|
java.lang.String |
getToken()
Gets the cursor token for this request, returned in the response to indicate there is another page of results
and in the request to get the next page of results.
|
T |
limit(int limit)
Builder method for
setLimit(int) |
protected abstract T |
me()
Returns "this" in concrete implementation classes.
|
void |
setLimit(int limit)
Sets the limit (page size) for this request.
|
void |
setToken(java.lang.String token)
Sets the cursor token for this request, returned in the response to indicate there is another page of results
and in the request to get the next page of results.
|
T |
token(java.lang.String token)
Builder method for
setToken(String) |
getMethod, getQuery, getServiceRelativePath, supports100Continue
protected abstract T me()
new CreateObjectRequest().identifier(path).content(content)
.public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> generateHeaders()
Request
generateHeaders
in class Request
public T limit(int limit)
setLimit(int)
public T token(java.lang.String token)
setToken(String)
public int getLimit()
public java.lang.String getToken()
public void setLimit(int limit)
public void setToken(java.lang.String token)