接口的使用
cn.taketoday.lang.TodayStrategies.FailureHandler
-
cn.taketoday.lang中TodayStrategies.FailureHandler的使用
修饰符和类型方法说明TodayStrategies.FailureHandler.handleMessage(BiConsumer<Supplier<String>, Throwable> messageHandler) Create a newTodayStrategies.FailureHandlerthat handles errors using a standard formatted message.Create a newTodayStrategies.FailureHandlerthat handles errors by logging trace messages.TodayStrategies.FailureHandler.throwing()Create a newTodayStrategies.FailureHandlerthat handles errors by throwing anIllegalArgumentException.TodayStrategies.FailureHandler.throwing(BiFunction<String, Throwable, ? extends RuntimeException> exceptionFactory) Create a newTodayStrategies.FailureHandlerthat handles errors by throwing an exception.修饰符和类型方法说明protected <T> TTodayStrategies.instantiateStrategy(String implementationName, Class<T> type, ClassInstantiator instantiator, TodayStrategies.FailureHandler failureHandler) <T> List<T>TodayStrategies.load(Class<T> strategyType, ClassInstantiator instantiator, TodayStrategies.FailureHandler failureHandler) Load and instantiate the strategy implementations of the given type from "META-INF/today.strategies", using the configured class loader, the given argument resolver, and custom failure handling provided by the given failure handler.<T> List<T>TodayStrategies.load(Class<T> strategyType, TodayStrategies.ArgumentResolver resolver, TodayStrategies.FailureHandler failureHandler) Load and instantiate the strategy implementations of the given type from "META-INF/today.strategies", using the configured class loader, the given argument resolver, and custom failure handling provided by the given failure handler.<T> List<T>TodayStrategies.load(Class<T> strategyType, TodayStrategies.FailureHandler failureHandler) Load and instantiate the strategy implementations of the given type from "META-INF/today.strategies", using the configured class loader with custom failure handling provided by the given failure handler.