Package org.jclouds.collect.internal
Class ArgsToPagedIterable<T,I extends ArgsToPagedIterable<T,I>>
- java.lang.Object
-
- org.jclouds.collect.internal.ArgsToPagedIterable<T,I>
-
- All Implemented Interfaces:
com.google.common.base.Function<IterableWithMarker<T>,PagedIterable<T>>
,Function<IterableWithMarker<T>,PagedIterable<T>>
,InvocationContext<I>
- Direct Known Subclasses:
Arg0ToPagedIterable
,ArgsToPagedIterable.FromCaller
@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>
Used to propagate the invoked method arguments during an advance in aPagedIterable
.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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.
-
Field Summary
Fields Modifier and Type Field Description protected GeneratedHttpRequest
request
-
Constructor Summary
Constructors Constructor Description ArgsToPagedIterable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
request
protected GeneratedHttpRequest request
-
-
Method Detail
-
apply
public PagedIterable<T> apply(IterableWithMarker<T> input)
-
getArgs
protected List<Object> getArgs(GeneratedHttpRequest request)
-
markerToNextForArgs
protected abstract com.google.common.base.Function<Object,IterableWithMarker<T>> markerToNextForArgs(List<Object> args)
-
setContext
public I setContext(HttpRequest request)
- Specified by:
setContext
in interfaceInvocationContext<T>
-
-