org.jclouds.net.domain
Class IpPermission

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

@Beta
public class IpPermission
extends Object
implements Comparable<IpPermission>

Ingress access to a destination protocol on particular ports by source, which could be an ip range (cidrblock), set of explicit security group ids in the current tenant, or security group names in another tenant.

See Also:
IpPermissions

Nested Class Summary
static class IpPermission.Builder
           
 
Constructor Summary
IpPermission(IpProtocol ipProtocol, int fromPort, int toPort, com.google.common.collect.Multimap<String,String> tenantIdGroupNamePairs, Iterable<String> groupIds, Iterable<String> cidrBlocks)
           
 
Method Summary
static IpPermission.Builder builder()
           
 int compareTo(IpPermission o)
          
 boolean equals(Object o)
           
 Set<String> getCidrBlocks()
          source of traffic is a cidrRange
 int getFromPort()
          Start of destination port range for the TCP and UDP protocols, or an ICMP type number.
 Set<String> getGroupIds()
          source of traffic allowed is on basis of another groupid in the same tenant
 IpProtocol getIpProtocol()
          destination IP protocol
 com.google.common.collect.Multimap<String,String> getTenantIdGroupNamePairs()
          source of traffic allowed is on basis of another group in a tenant, as opposed to by cidr
 int getToPort()
          End of destination port range for the TCP and UDP protocols, or an ICMP code.
 int hashCode()
           
protected  com.google.common.base.Objects.ToStringHelper string()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IpPermission

public IpPermission(IpProtocol ipProtocol,
                    int fromPort,
                    int toPort,
                    com.google.common.collect.Multimap<String,String> tenantIdGroupNamePairs,
                    Iterable<String> groupIds,
                    Iterable<String> cidrBlocks)
Method Detail

builder

public static IpPermission.Builder builder()

compareTo

public int compareTo(IpPermission o)

Specified by:
compareTo in interface Comparable<IpPermission>

getIpProtocol

public IpProtocol getIpProtocol()
destination IP protocol


getFromPort

public int getFromPort()
Start of destination 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).


getToPort

public int getToPort()
End of destination 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).


getTenantIdGroupNamePairs

public com.google.common.collect.Multimap<String,String> getTenantIdGroupNamePairs()
source of traffic allowed is on basis of another group in a tenant, as opposed to by cidr


getGroupIds

public Set<String> getGroupIds()
source of traffic allowed is on basis of another groupid in the same tenant


getCidrBlocks

public Set<String> getCidrBlocks()
source of traffic is a cidrRange


equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

string

protected com.google.common.base.Objects.ToStringHelper string()


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.