jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Shoylev <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] Adds support for Floating IP (#135)
Date Thu, 28 Aug 2014 23:53:10 GMT
> +   public static class CreateOptions extends FloatingIP {
> +      /**
> +       * Copy constructor
> +       */
> +      private CreateOptions(FloatingIP floatingIP) {
> +         super(floatingIP);
> +      }
> +   }
> +   public static class UpdateOptions extends FloatingIP {
> +      /**
> +       * Copy constructor
> +       */
> +      private UpdateOptions(FloatingIP floatingIP) {
> +         super(floatingIP);
> +      }
> +   }

Not quite!
The builders restrict the user to building valid object types. While this is used to ensure
very little code is repeated, it still allows us to have distinct rules about what is returned
by the service and what can be sent to the service in each call, and all of that ensured by
compiler checks as well.
This was part of the neutron refactoring discussions we had around more heavily using GSON
and domain classes to do the heavy lifting - the trick was making sure there is no user confusion
or reduced usability.
If you have more questions about how we want this pattern to work, and especially if you want
to help improve it, let's do it over email, as it usually takes more explaining.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/135/files#r16875473
Mime
View raw message