- All Superinterfaces:
org.miaixz.bus.core.Provider,Serializable
- All Known Implementing Classes:
FallbackProvider,MethodProvider,RequestProvider
public interface Provider
extends org.miaixz.bus.core.Provider
Defines the contract for a limiter provider, which is responsible for executing limiting rules. This interface
extends
Provider and specifies methods for retrieving the limiting strategy and
processing method invocations under limiting rules.- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
-
Method Details
-
get
StrategyMode get()Retrieves the limiting strategy associated with this provider.- Returns:
- The
StrategyModerepresenting the limiting strategy.
-
process
Processes a method invocation according to the limiting rules defined by this provider. This method is typically called before the actual method execution to apply rate limiting, circuit breaking, or other control mechanisms.- Parameters:
bean- The target object on which the method is invoked.method- TheMethodbeing invoked.args- The arguments passed to the method invocation.- Returns:
- The result of the method invocation after applying limiting rules, or a fallback value.
-
type
Returns the type of this provider, which isEnumValue.Povider.LIMITER.- Specified by:
typein interfaceorg.miaixz.bus.core.Provider- Returns:
- The provider type.
-