org.jclouds.ec2.domain
Class IpPermissionImpl

java.lang.Object
  extended by org.jclouds.ec2.domain.IpPermissionImpl
All Implemented Interfaces:
Comparable<IpPermission>, IpPermission
Direct Known Subclasses:
IpPermissions

public class IpPermissionImpl
extends Object
implements IpPermission

Author:
Adrian Cole
See Also:

Nested Class Summary
static class IpPermissionImpl.Builder
           
 
Constructor Summary
IpPermissionImpl(IpProtocol ipProtocol, int fromPort, int toPort, com.google.common.collect.Multimap<String,String> userIdGroupPairs, Iterable<String> groupIds, Iterable<String> ipRanges)
           
 
Method Summary
static IpPermissionImpl.Builder builder()
           
 int compareTo(IpPermission o)
          
 boolean equals(Object obj)
           
 int getFromPort()
          Start of port range for the TCP and UDP protocols, or an ICMP type number.
 Set<String> getGroupIds()
          List of security group Ids
 IpProtocol getIpProtocol()
          IP protocol
 Set<String> getIpRanges()
          IP ranges.
 int getToPort()
          End of port range for the TCP and UDP protocols, or an ICMP code.
 com.google.common.collect.Multimap<String,String> getUserIdGroupPairs()
          List of security group and user ID pairs.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IpPermissionImpl

public IpPermissionImpl(IpProtocol ipProtocol,
                        int fromPort,
                        int toPort,
                        com.google.common.collect.Multimap<String,String> userIdGroupPairs,
                        Iterable<String> groupIds,
                        Iterable<String> ipRanges)
Method Detail

builder

public static IpPermissionImpl.Builder builder()

compareTo

public int compareTo(IpPermission o)

Specified by:
compareTo in interface Comparable<IpPermission>

getFromPort

public int getFromPort()
Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).

Specified by:
getFromPort in interface IpPermission

getToPort

public int getToPort()
End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).

Specified by:
getToPort in interface IpPermission

getUserIdGroupPairs

public com.google.common.collect.Multimap<String,String> getUserIdGroupPairs()
List of security group and user ID pairs.

Specified by:
getUserIdGroupPairs in interface IpPermission

getGroupIds

public Set<String> getGroupIds()
List of security group Ids

Specified by:
getGroupIds in interface IpPermission

getIpProtocol

public IpProtocol getIpProtocol()
IP protocol

Specified by:
getIpProtocol in interface IpPermission

getIpRanges

public Set<String> getIpRanges()
IP ranges.

Specified by:
getIpRanges in interface IpPermission

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012 jclouds. All Rights Reserved.