Package org.jppf.node.policy
Class AbstractIsInIPSubnet<P extends AbstractIPAddressPattern>
java.lang.Object
org.jppf.node.policy.ExecutionPolicy
org.jppf.node.policy.AbstractIsInIPSubnet<P>
- Type Parameters:
P- the type of pattern handled by this class.
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
IsInIPv4Subnet,IsInIPv6Subnet
public abstract class AbstractIsInIPSubnet<P extends AbstractIPAddressPattern>
extends ExecutionPolicy
Common abstract super class for execution policy rules that encapsulate a test of type IP is in Subnet string.
- Author:
- Daniel Widdis, Laurent Cohen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jppf.node.policy.ExecutionPolicy
ExecutionPolicy.AndRule, ExecutionPolicy.NotRule, ExecutionPolicy.OrRule, ExecutionPolicy.XorRule -
Field Summary
Fields inherited from class org.jppf.node.policy.ExecutionPolicy
children -
Constructor Summary
ConstructorsConstructorDescriptionAbstractIsInIPSubnet(String... subnets) Define a membership test using ipv4.addresses property to determine if a node or driver is in one of the specified subnets.AbstractIsInIPSubnet(Collection<String> subnets) Define a membership test using ipv6.addresses property to determine if a node is in one of the specified subnets. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(PropertiesCollection<String> info) Determines whether this policy accepts the specified node.toString(int n) Get an xml string representation of this policy with the specified starting indentation level.Methods inherited from class org.jppf.node.policy.ExecutionPolicy
and, and, andNot, andNot, checkRules, evaluate, getChildren, getContext, getProperty, indent, negate, not, Not, or, or, orNot, orNot, setContext, setContext, tagEnd, tagStart, toString, toXML, xmlElement, xmlElement, xor, xor
-
Constructor Details
-
AbstractIsInIPSubnet
Define a membership test using ipv4.addresses property to determine if a node or driver is in one of the specified subnets.- Parameters:
subnets- One or more strings representing either a valid IP subnet in CIDR notation or IP address range pattern as defined inIPv4AddressPatternorIPv6AddressPattern
-
AbstractIsInIPSubnet
Define a membership test using ipv6.addresses property to determine if a node is in one of the specified subnets.- Parameters:
subnets- One or more strings representing either a valid IP subnet in CIDR notation or IP address range pattern as defined inIPv4AddressPatternorIPv6AddressPattern
-
-
Method Details
-
accepts
Determines whether this policy accepts the specified node.- Specified by:
acceptsin classExecutionPolicy- Parameters:
info- system information for the node on which the tasks will run if accepted.- Returns:
- true if the node is accepted, false otherwise.
-
toString
Description copied from class:ExecutionPolicyGet an xml string representation of this policy with the specified starting indentation level.- Specified by:
toStringin classExecutionPolicy- Parameters:
n- the size of the indent to startwith.- Returns:
- an indented string depending on the value of
toStringIndent.
-