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
Modifier and TypeMethodDescriptionbooleanAdd an entry to the response page builder.build()Produce the response page from a response page builder instance.voidCalled to indicate that there are more entries to retrieve using the given paging token.
-
Method Details
-
build
R build()Produce the response page from a response page builder instance. -
addEntry
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
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
-