Class HostnameFilter
java.lang.Object
com.github.markusbernhardt.proxy.selector.whitelist.HostnameFilter
- All Implemented Interfaces:
UriFilter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate HostnameFilter.Modeprivate static final Stringprivate String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptprivate voidExtracts the protocol if one is given to initialize the protocol matcher.private booleanisProtocolMatching(URI uri) Applies the protocol filter if available to see if we have a match.
-
Field Details
-
PROTOCOL_ENDING
- See Also:
-
matchTo
-
protocolFilter
-
mode
-
-
Constructor Details
-
HostnameFilter
Constructor- Parameters:
mode- the filter mode.matchTo- the match criteria.
-
-
Method Details
-
extractProtocolFilter
private void extractProtocolFilter()Extracts the protocol if one is given to initialize the protocol matcher. -
accept
-
isProtocolMatching
Applies the protocol filter if available to see if we have a match.- Parameters:
uri- to test for a correct protocol.- Returns:
- true if passed else false.
-