Package org.jclouds.gogrid.domain

Examples of org.jclouds.gogrid.domain.IpPortPair$Builder


   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(checkNotNull(input, "input is null") instanceof IpPortPair,
               "this binder is only valid for a IpPortPair argument");

      IpPortPair ipPortPair = (IpPortPair) input;

      checkNotNull(ipPortPair.getIp(), "There must be an IP address defined");
      checkNotNull(ipPortPair.getIp().getIp(), "There must be an IP address defined in Ip object");
      checkState(ipPortPair.getPort() > 0, "The port number must be a positive integer");

      ImmutableMultimap.Builder<String, String> builder = ImmutableMultimap.<String, String> builder();

      builder.put(VIRTUAL_IP_KEY + "ip", ipPortPair.getIp().getIp());
      builder.put(VIRTUAL_IP_KEY + "port", String.valueOf(ipPortPair.getPort()));
     
      return (R) request.toBuilder().replaceQueryParams(builder.build()).build();
   }
View Full Code Here


   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(checkNotNull(input, "input is null") instanceof IpPortPair,
               "this binder is only valid for a IpPortPair argument");

      IpPortPair ipPortPair = (IpPortPair) input;

      checkNotNull(ipPortPair.getIp(), "There must be an IP address defined");
      checkNotNull(ipPortPair.getIp().getIp(), "There must be an IP address defined in Ip object");
      checkState(ipPortPair.getPort() > 0, "The port number must be a positive integer");

      ImmutableMultimap.Builder<String, String> builder = ImmutableMultimap.<String, String> builder();

      builder.put(VIRTUAL_IP_KEY + "ip", ipPortPair.getIp().getIp());
      builder.put(VIRTUAL_IP_KEY + "port", String.valueOf(ipPortPair.getPort()));
     
      return (R) request.toBuilder().replaceQueryParams(builder.build()).build();
   }
View Full Code Here

   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(checkNotNull(input, "input is null") instanceof IpPortPair,
               "this binder is only valid for a IpPortPair argument");

      IpPortPair ipPortPair = (IpPortPair) input;

      checkNotNull(ipPortPair.getIp(), "There must be an IP address defined");
      checkNotNull(ipPortPair.getIp().getIp(), "There must be an IP address defined in Ip object");
      checkState(ipPortPair.getPort() > 0, "The port number must be a positive integer");

      ImmutableMultimap.Builder<String, String> builder = ImmutableMultimap.<String, String> builder();

      builder.put(VIRTUAL_IP_KEY + "ip", ipPortPair.getIp().getIp());
      builder.put(VIRTUAL_IP_KEY + "port", String.valueOf(ipPortPair.getPort()));
     
      return (R) request.toBuilder().replaceQueryParams(builder.build()).build();
   }
View Full Code Here

TOP

Related Classes of org.jclouds.gogrid.domain.IpPortPair$Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.