A
- 注解类I
- 返回类型public interface MethodAnnotationLifeCycle<A extends Annotation,I> extends Interceptor<I>
Modifier and Type | Method and Description |
---|---|
default void |
onError(ForestRuntimeException ex,
ForestRequest request,
ForestResponse response)
默认回调函数: 请求失败后调用该方法
|
void |
onMethodInitialized(ForestMethod method,
A annotation) |
default void |
onSuccess(I data,
ForestRequest request,
ForestResponse response)
默认回调函数: 请求成功后调用该方法
|
addAttribute, afterExecute, beforeExecute, getAttribute, getAttribute, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsString, getAttributes, onInvokeMethod, onLoadCookie, onProgress, onRedirection, onRetry, onSaveCookie
void onMethodInitialized(ForestMethod method, A annotation)
default void onError(ForestRuntimeException ex, ForestRequest request, ForestResponse response)
Interceptor
默认为什么都不做
onError
in interface Interceptor<I>
onError
in interface OnError
ex
- 请求失败的异常对象request
- Forest请求对象response
- Forest响应对象default void onSuccess(I data, ForestRequest request, ForestResponse response)
Interceptor
默认为什么都不做
Copyright © 2022. All rights reserved.