org.apache.whirr.service
Class FirewallManager.Rule

java.lang.Object
  extended by org.apache.whirr.service.FirewallManager.Rule
Enclosing class:
FirewallManager

public static class FirewallManager.Rule
extends Object


Method Summary
static FirewallManager.Rule create()
           
 FirewallManager.Rule destination(Cluster.Instance destination)
           
 FirewallManager.Rule destination(com.google.common.base.Predicate<Cluster.Instance> destinationPredicate)
           
 FirewallManager.Rule destination(Set<Cluster.Instance> destinations)
           
 FirewallManager.Rule port(int port)
           
 FirewallManager.Rule ports(int... ports)
           
 FirewallManager.Rule source(String source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static FirewallManager.Rule create()

source

public FirewallManager.Rule source(String source)
Parameters:
source - The allowed source IP for traffic. If not set, this will default to ClusterSpec.getClientCidrs(), or, if that is not set, to the client's originating IP.

destination

public FirewallManager.Rule destination(Cluster.Instance destination)
Parameters:
destination - The allowed destination instance.

destination

public FirewallManager.Rule destination(Set<Cluster.Instance> destinations)
Parameters:
destinations - The allowed destination instances.

destination

public FirewallManager.Rule destination(com.google.common.base.Predicate<Cluster.Instance> destinationPredicate)
Parameters:
destinationPredicate - A predicate which is used to evaluate the allowed destination instances.

port

public FirewallManager.Rule port(int port)
Parameters:
port - The port on the destination which is to be opened. Overrides any previous calls to port(int) or ports(int...).

ports

public FirewallManager.Rule ports(int... ports)
Parameters:
ports - The ports on the destination which are to be opened. Overrides any previous calls to port(int) or ports(int...).


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.