Class FeatureProxy.Builder<T>
java.lang.Object
cloud.opencode.base.feature.proxy.FeatureProxy.Builder<T>
- Type Parameters:
T- the interface type | 接口类型
- Enclosing class:
FeatureProxy
Builder for FeatureProxy
FeatureProxy构建器
- Since:
- JDK 25, opencode-base-feature V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the proxy 构建代理contextSupplier(Supplier<FeatureContext> contextSupplier) Set the context supplier for dynamic context 设置动态上下文的上下文供应器features(OpenFeature features) Set the OpenFeature instance 设置OpenFeature实例whenDisabled(FeatureProxy.DisabledBehavior behavior) Set behavior when feature is disabled 设置功能禁用时的行为
-
Method Details
-
features
Set the OpenFeature instance 设置OpenFeature实例- Parameters:
features- the OpenFeature instance | OpenFeature实例- Returns:
- this builder | 此构建器
-
contextSupplier
Set the context supplier for dynamic context 设置动态上下文的上下文供应器- Parameters:
contextSupplier- supplier that provides context for each method call | 为每次方法调用提供上下文的供应器- Returns:
- this builder | 此构建器
-
whenDisabled
Set behavior when feature is disabled 设置功能禁用时的行为- Parameters:
behavior- the behavior | 行为- Returns:
- this builder | 此构建器
-
build
-