org.apache.whirr.service
Class FirewallManager.Rule
java.lang.Object
org.apache.whirr.service.FirewallManager.Rule
- Enclosing class:
- FirewallManager
public static class FirewallManager.Rule
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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-2013 The Apache Software Foundation. All Rights Reserved.