org.jclouds.cloudstack.domain
Class PortForwardingRule

java.lang.Object
  extended by org.jclouds.cloudstack.domain.PortForwardingRule
All Implemented Interfaces:
Comparable<PortForwardingRule>

public class PortForwardingRule
extends Object
implements Comparable<PortForwardingRule>

Class PortForwardingRule

Author:
Adrian Cole, Andrei Savu

Nested Class Summary
static class PortForwardingRule.Builder<T extends PortForwardingRule.Builder<T>>
           
static class PortForwardingRule.Protocol
           
static class PortForwardingRule.State
           
 
Constructor Summary
protected PortForwardingRule(String id, String IPAddress, String IPAddressId, int privatePort, PortForwardingRule.Protocol protocol, int publicPort, PortForwardingRule.State state, String virtualMachineDisplayName, String virtualMachineId, String virtualMachineName, Set<String> CIDRs, int privateEndPort, int publicEndPort)
           
 
Method Summary
static PortForwardingRule.Builder<?> builder()
           
 int compareTo(PortForwardingRule o)
           
 boolean equals(Object obj)
           
 Set<String> getCIDRs()
           
 String getId()
           
 String getIPAddress()
           
 String getIPAddressId()
           
 int getPrivateEndPort()
           
 int getPrivatePort()
           
 PortForwardingRule.Protocol getProtocol()
           
 int getPublicEndPort()
           
 int getPublicPort()
           
 PortForwardingRule.State getState()
           
 String getVirtualMachineDisplayName()
           
 String getVirtualMachineId()
           
 String getVirtualMachineName()
           
 int hashCode()
           
protected  com.google.common.base.Objects.ToStringHelper string()
           
 PortForwardingRule.Builder<?> toBuilder()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortForwardingRule

protected PortForwardingRule(String id,
                             @Nullable
                             String IPAddress,
                             @Nullable
                             String IPAddressId,
                             int privatePort,
                             @Nullable
                             PortForwardingRule.Protocol protocol,
                             int publicPort,
                             @Nullable
                             PortForwardingRule.State state,
                             @Nullable
                             String virtualMachineDisplayName,
                             @Nullable
                             String virtualMachineId,
                             @Nullable
                             String virtualMachineName,
                             @Nullable
                             Set<String> CIDRs,
                             int privateEndPort,
                             int publicEndPort)
Method Detail

builder

public static PortForwardingRule.Builder<?> builder()

toBuilder

public PortForwardingRule.Builder<?> toBuilder()

getId

public String getId()
Returns:
the ID of the port forwarding rule

getIPAddress

@Nullable
public String getIPAddress()
Returns:
the public ip address for the port forwarding rule

getIPAddressId

@Nullable
public String getIPAddressId()
Returns:
the public ip address id for the port forwarding rule

getPrivatePort

public int getPrivatePort()
Returns:
the private port for the port forwarding rule

getProtocol

@Nullable
public PortForwardingRule.Protocol getProtocol()
Returns:
the protocol of the port forwarding rule

getPublicPort

public int getPublicPort()
Returns:
the public port for the port forwarding rule

getState

@Nullable
public PortForwardingRule.State getState()
Returns:
the state of the rule

getVirtualMachineDisplayName

@Nullable
public String getVirtualMachineDisplayName()
Returns:
the VM display name for the port forwarding rule

getVirtualMachineId

@Nullable
public String getVirtualMachineId()
Returns:
the VM ID for the port forwarding rule

getVirtualMachineName

@Nullable
public String getVirtualMachineName()
Returns:
the VM name for the port forwarding rule

getCIDRs

public Set<String> getCIDRs()
Returns:
the cidr list to forward traffic from

getPrivateEndPort

public int getPrivateEndPort()
Returns:
the starting port of port forwarding rule's private port range

getPublicEndPort

public int getPublicEndPort()
Returns:
the starting port of port forwarding rule's public port range

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

string

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

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(PortForwardingRule o)
Specified by:
compareTo in interface Comparable<PortForwardingRule>


Copyright © 2009-2013 jclouds. All Rights Reserved.