类 URIPreconditions
java.lang.Object
org.apache.pulsar.common.util.URIPreconditions
Static convenience URI checker.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidCheck whether the given string is a legal URI and passes the user's check.static voidCheck whether the given string is a legal URI and passes the user's check.static voidcheckURIIfPresent(String uri, Predicate<URI> predicate) Check whether the given string is a legal URI and passes the user's check.static voidcheckURIIfPresent(String uri, Predicate<URI> predicate, String errorMessage) Check whether the given string is a legal URI and passes the user's check.
-
构造器详细资料
-
URIPreconditions
public URIPreconditions()
-
-
方法详细资料
-
checkURI
public static void checkURI(@Nonnull String uri, @Nonnull Predicate<URI> predicate) throws IllegalArgumentException Check whether the given string is a legal URI and passes the user's check.- 参数:
uri- URI Stringpredicate- User defined rule- 抛出:
IllegalArgumentException- Illegal URI or failed in the user's rules
-
checkURIIfPresent
public static void checkURIIfPresent(@Nullable String uri, @Nonnull Predicate<URI> predicate) throws IllegalArgumentException Check whether the given string is a legal URI and passes the user's check.- 参数:
uri- URI Stringpredicate- User defined rule- 抛出:
IllegalArgumentException- Illegal URI or failed in the user's rules
-
checkURIIfPresent
public static void checkURIIfPresent(@Nullable String uri, @Nonnull Predicate<URI> predicate, @Nullable String errorMessage) throws IllegalArgumentException Check whether the given string is a legal URI and passes the user's check.- 参数:
uri- URI Stringpredicate- User defined ruleerrorMessage- Error message- 抛出:
IllegalArgumentException- Illegal URI or failed in the user's rules
-
checkURI
public static void checkURI(@Nonnull String uri, @Nonnull Predicate<URI> predicate, @Nullable String errorMessage) throws IllegalArgumentException Check whether the given string is a legal URI and passes the user's check.- 参数:
uri- URI Stringpredicate- User defined ruleerrorMessage- Error message- 抛出:
IllegalArgumentException- Illegal URI or failed in the user's rules
-