jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)
Date Thu, 19 Jan 2017 08:36:06 GMT
nacx commented on this pull request.



> +            @ConstructorProperties({ "devices", "meta" })
+            public Devices(List<Device> items, Meta meta) {
+                super(items, meta);
+            }
+        }
+
+        private static class ToPagedIterable extends BaseToPagedIterable<Device, ListOptions>
{
+
+            @Inject ToPagedIterable(PacketApi api, Function<Href, ListOptions> linkToOptions)
{
+                super(api, linkToOptions);
+            }
+
+           @Override
+           protected List<Object> getArgs(GeneratedHttpRequest request) {
+              return request.getCaller().get().getArgs();
+           }

Oh, I see. It is a nested API that needs the args from the caller, not from their own methods.
In that case, this function should better extend [Arg0ToPagedIterable.FromCaller](https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/collect/internal/Arg0ToPagedIterable.java#L53),
which is intended for nested APIs.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/345
Mime
View raw message