protocol, and optional
We choose the name "target" as it is the primary new concept and purpose of this API and is otherwise not used in standard firewalld service terminology.
- AO Industries, Inc.
Method SummaryModifier and TypeMethodDescriptionCombines this target with the given target if possible.
intOrdered by destination, portRange, protocol; those with port ranges before those that are protocol-only.
booleanGets the destination network range for this target.Gets the optional port range for this target.Gets the protocol for this target.
toStringpublic String toString()
equalspublic boolean equals
hashCodepublic int hashCode()
compareTopublic int compareTo
(Target other)Ordered by destination, portRange, protocol; those with port ranges before those that are protocol-only.
- Specified by:
- See Also:
getDestinationpublic InetAddressPrefix getDestination()Gets the destination network range for this target.
getProtocolpublic Protocol getProtocol()Gets the protocol for this target.
getPortRangepublic IPortRange getPortRange()Gets the optional port range for this target.
coalesceCombines this target with the given target if possible.
If have the same destination, tries to combine by protocol and port range. If have the same protocol and port range, tries to combine by destination network prefixes.
When combining by protocol and port range, a target with no port range matches all ports on that protocol.
- The new target that represents the union of this and the other target or
nullwhen they cannot be combined.