Package org.projectnessie.services.spi
Interface PagedResponseHandler<R,E>
-
- Type Parameters:
R- Final response object type.E- Entry type.
- All Known Implementing Classes:
PagedCountingResponseHandler
public interface PagedResponseHandler<R,E>Interface implemented by network protocol specific implementations (like HTTP/REST) to support response pagination using tokens.Protocol specific implementations "tell" the backend (Nessie service implementations) whether a response entry fits in the current response page sent to the client or not via the result of the
addEntry(Object)method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddEntry(E entry)Add an entry to the response page builder.Rbuild()Produce the response page from a response page builder instance.voidhasMore(java.lang.String pagingToken)Called to indicate that there are more entries to retrieve using the given paging token.
-
-
-
Method Detail
-
build
R build()
Produce the response page from a response page builder instance.
-
addEntry
boolean addEntry(E entry)
Add an entry to the response page builder.- Parameters:
entry- the entry to add- Returns:
trueifentrycould be added to the response page orfalseif not
-
hasMore
void hasMore(java.lang.String pagingToken)
Called to indicate that there are more entries to retrieve using the given paging token.- Parameters:
pagingToken- paging token to be used to access the next page
-
-