@Beta public abstract class ArgsToPagedIterable<T,I extends ArgsToPagedIterable<T,I>> extends Object implements com.google.common.base.Function<IterableWithMarker<T>,PagedIterable<T>>, InvocationContext<I>
PagedIterable
.
In order to fetch the next page in the result set, subclasses may need to have the context of the initial request. This class propagates the arguments used in the original request, so they can be used to fetch the next page in the result set.
Modifier and Type | Class and Description |
---|---|
static class |
ArgsToPagedIterable.FromCaller<T,I extends ArgsToPagedIterable.FromCaller<T,I>>
Sometimes the arguments in the invoked method do not provide enough
information to fetch the next page of the result set.
|
Modifier and Type | Field and Description |
---|---|
protected GeneratedHttpRequest |
request |
Constructor and Description |
---|
ArgsToPagedIterable() |
Modifier and Type | Method and Description |
---|---|
PagedIterable<T> |
apply(IterableWithMarker<T> input) |
protected List<Object> |
getArgs(GeneratedHttpRequest request) |
protected abstract com.google.common.base.Function<Object,IterableWithMarker<T>> |
markerToNextForArgs(List<Object> args) |
I |
setContext(HttpRequest request) |
protected GeneratedHttpRequest request
public PagedIterable<T> apply(IterableWithMarker<T> input)
apply
in interface com.google.common.base.Function<IterableWithMarker<T>,PagedIterable<T>>
protected List<Object> getArgs(GeneratedHttpRequest request)
protected abstract com.google.common.base.Function<Object,IterableWithMarker<T>> markerToNextForArgs(List<Object> args)
public I setContext(HttpRequest request)
setContext
in interface InvocationContext<I extends ArgsToPagedIterable<T,I>>
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.