你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
FeatureHandler Class
- java.
lang. Object - com.
azure. spring. cloud. feature. management. web. FeatureHandler
- com.
Implements
public class FeatureHandler
implements org.springframework.web.servlet.HandlerInterceptor
Interceptor for Requests to check if they should be run.
Constructor Summary
Constructor | Description |
---|---|
FeatureHandler(FeatureManager featureManager, FeatureManagerSnapshot featureManagerSnapshot, DisabledFeaturesHandler disabledFeaturesHandler) |
Interceptor for Requests to check if they should be run. |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean |
preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
Checks if the endpoint being called has the @Feature |
Methods inherited from java.lang.Object
Constructor Details
FeatureHandler
public FeatureHandler(FeatureManager featureManager, FeatureManagerSnapshot featureManagerSnapshot, DisabledFeaturesHandler disabledFeaturesHandler)
Interceptor for Requests to check if they should be run.
Parameters:
Method Details
preHandle
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
Checks if the endpoint being called has the @FeatureOn annotation. Checks if the feature is on. Can redirect if feature is off, or can return the disabled feature handler.
Parameters:
Returns: