All Known Implementing Classes:
PortBlock, RegexBlock, UrlBlock

public sealed interface Block permits UrlBlock, PortBlock, RegexBlock
This is a sealed interface that represents a Block of a URL, Port, or Regex type. Classes that implement this interface are permitted to validate a URL against a particular set of blocking criteria.

Note: Constructors of implementing classes can throw IllegalArgumentException or other exceptions if the provided value does not meet the expected criteria.

Permitted subtypes: UrlBlock, PortBlock, RegexBlock

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Validates a given URL against the blocking criteria.
  • Method Details

    • validate

      void validate(String url)
      Validates a given URL against the blocking criteria. Implementing classes should throw an appropriate exception if the URL is found to match the block conditions.
      Parameters:
      url - The URL to validate.
      Throws:
      ConnectorInputException - if the URL matches the block conditions.