| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final char | NEGATION_CHAR_PATTERN
Used to negate a host pattern |
| public static final char | NON_STANDARD_PORT_PATTERN_ENCLOSURE_END_DELIM
Non-standard port specification host pattern enclosure end delimiter |
| public static final char | NON_STANDARD_PORT_PATTERN_ENCLOSURE_START_DELIM
Non-standard port specification host pattern enclosure start delimiter |
| public static final String | PATTERN_CHARS
The available pattern characters |
| private Collection | |
| public static final char | PORT_VALUE_DELIMITER
Port value separator if non-standard port pattern used |
| public static final char | SINGLE_CHAR_PATTERN
Used in a host pattern to denote any one character |
| public static final char | WILDCARD_PATTERN
Used in a host pattern to denote zero or more consecutive characters |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Collection | |
| public boolean | Returns: true if the name / address matches the pattern(s)The host name / address - ignored if host, int null/emptyThe connection port port)Checks if a given host name / address matches the entry's host pattern(s) |
| public static boolean | |
| public static boolean | Returns: true if the name / address matches the patternThe host name / address - ignored if host, Pattern null/emptyThe host pattern)Pattern - ignored if nullChecks if a given host name / address matches a host pattern |
| public static boolean | Returns: true if ports are effectively equal1st port value - if non-positive then assumed to be port1, int DEFAULT_PORT2nd port value - if non-positive then assumed to be port2)DEFAULT_PORT
|
| public static boolean | Returns: true if the pattern is not empty and contains no wildcard charactersThe pattern to check - ignored if pattern)null/empty
|
| public static boolean | Returns: true if valid pattern characterThe character to validate ch)Checks if the given character is valid for a host pattern. |
| public static List | |
| public static List | |
| public void | |
| public static HostPatternValue | Returns: The regular expression matcherPattern and the indication whether it is a negating
pattern or not - null if no original stringThe original pattern string - ignored if patternString)null/emptyConverts a host pattern string to a regular expression matcher Note pattern matching is case insensitive |
| ALL_HOSTS_PATTERN | back to summary |
|---|---|
| public static final String ALL_HOSTS_PATTERN | |
| NEGATION_CHAR_PATTERN | back to summary |
|---|---|
| public static final char NEGATION_CHAR_PATTERN Used to negate a host pattern | |
| NON_STANDARD_PORT_PATTERN_ENCLOSURE_END_DELIM | back to summary |
|---|---|
| public static final char NON_STANDARD_PORT_PATTERN_ENCLOSURE_END_DELIM Non-standard port specification host pattern enclosure end delimiter | |
| NON_STANDARD_PORT_PATTERN_ENCLOSURE_START_DELIM | back to summary |
|---|---|
| public static final char NON_STANDARD_PORT_PATTERN_ENCLOSURE_START_DELIM Non-standard port specification host pattern enclosure start delimiter | |
| PATTERN_CHARS | back to summary |
|---|---|
| public static final String PATTERN_CHARS The available pattern characters | |
| patterns | back to summary |
|---|---|
| private Collection<HostPatternValue> patterns | |
| PORT_VALUE_DELIMITER | back to summary |
|---|---|
| public static final char PORT_VALUE_DELIMITER Port value separator if non-standard port pattern used | |
| SINGLE_CHAR_PATTERN | back to summary |
|---|---|
| public static final char SINGLE_CHAR_PATTERN Used in a host pattern to denote any one character | |
| WILDCARD_PATTERN | back to summary |
|---|---|
| public static final char WILDCARD_PATTERN Used in a host pattern to denote zero or more consecutive characters | |
| HostPatternsHolder | back to summary |
|---|---|
| protected HostPatternsHolder() | |
| getPatterns | back to summary |
|---|---|
| public Collection | |
| isHostMatch | back to summary |
|---|---|
| public boolean isHostMatch(String host, int port) Checks if a given host name / address matches the entry's host pattern(s)
| |
| isHostMatch | back to summary |
|---|---|
| public static boolean isHostMatch(String host, int port, Collection<HostPatternValue> patterns) | |
| isHostMatch | back to summary |
|---|---|
| public static boolean isHostMatch(String host, Pattern pattern) Checks if a given host name / address matches a host pattern | |
| isPortMatch | back to summary |
|---|---|
public static boolean isPortMatch(int port1, int port2)
| |
| isSpecificHostPattern | back to summary |
|---|---|
public static boolean isSpecificHostPattern(String pattern)
| |
| isValidPatternChar | back to summary |
|---|---|
| public static boolean isValidPatternChar(char ch) Checks if the given character is valid for a host pattern. Valid characters are:
| |
| parsePatterns | back to summary |
|---|---|
| public static List | |
| parsePatterns | back to summary |
|---|---|
| public static List | |
| setPatterns | back to summary |
|---|---|
| public void setPatterns(Collection<HostPatternValue> patterns) | |
| toPattern | back to summary |
|---|---|
| public static HostPatternValue toPattern(CharSequence patternString) Converts a host pattern string to a regular expression matcher Note pattern matching is case insensitive
| |