类的使用
com.dtflys.forest.http.ForestResponse
使用ForestResponse的程序包
程序包
说明
-
com.dtflys.forest中ForestResponse的使用
返回变量类型为ForestResponse的类型的com.dtflys.forest中的方法修饰符和类型方法说明static List<ForestResponse>Forest.await(ForestFuture... futures) 等待多个请求响应结果,并阻塞当前调用改方法的线程,只有当参数中所有请求结果都返回后才会继续执行static List<ForestResponse>Forest.await(Collection<ForestFuture> futures) 等待多个请求响应结果,并阻塞当前调用改方法的线程,只有当参数中所有请求结果都返回后才会继续执行类型变量类型为ForestResponse的com.dtflys.forest中的方法参数修饰符和类型方法说明static voidForest.await(Collection<ForestFuture> futures, Consumer<ForestResponse> callback) 等待多个请求响应结果,并阻塞当前调用改方法的线程,当参数中所有请求结果都返回后调用参数中的 callback 回调函数 -
com.dtflys.forest.backend中ForestResponse的使用
参数类型为ForestResponse的com.dtflys.forest.backend中的方法修饰符和类型方法说明voidResponseHandler.handleError(ForestResponse response, Throwable ex) ResponseHandler.handleSync(ForestResponse response, int statusCode, String msg) -
com.dtflys.forest.backend.httpclient.request中ForestResponse的使用
-
com.dtflys.forest.backend.httpclient.response中ForestResponse的使用
修饰符和类型方法说明HttpclientForestResponseFactory.createResponse(ForestRequest<?> request, org.apache.http.HttpResponse httpResponse, LifeCycleHandler lifeCycleHandler, Throwable exception, Date requestTime) 修饰符和类型方法说明voidHttpclientResponseHandler.handleSync(org.apache.http.HttpResponse httpResponse, ForestResponse response) -
com.dtflys.forest.backend.okhttp3.executor中ForestResponse的使用
-
com.dtflys.forest.backend.okhttp3.response中ForestResponse的使用
修饰符和类型方法说明OkHttp3ForestResponseFactory.createResponse(ForestRequest<?> request, okhttp3.Response res, LifeCycleHandler lifeCycleHandler, Throwable exception, Date requestTime) 修饰符和类型方法说明OkHttp3ResponseHandler.handleSync(okhttp3.Response okResponse, ForestResponse response) -
com.dtflys.forest.callback中ForestResponse的使用
参数类型为ForestResponse的com.dtflys.forest.callback中的方法修饰符和类型方法说明voidOnCanceled.onCanceled(ForestRequest req, ForestResponse res) 请求取消后调用该方法voidOnError.onError(ForestRuntimeException ex, ForestRequest req, ForestResponse res) 请求失败后调用该方法voidOnRedirection.onRedirection(ForestRequest<?> redirectReq, ForestRequest<?> prevReq, ForestResponse<?> prevRes) 回调函数:在请求重定向时触发voidOnRetry.onRetry(ForestRequest req, ForestResponse res) 回调函数: 在触发请求重试时执行voidOnSuccess.onSuccess(T data, ForestRequest req, ForestResponse res) 请求成功后调用该方法booleanDefaultRetryWhen.retryWhen(ForestRequest request, ForestResponse response) booleanRetryWhen.retryWhen(ForestRequest req, ForestResponse res) 回调函数: 是否触发重试booleanDefaultSuccessWhen.successWhen(ForestRequest req, ForestResponse res) booleanSuccessWhen.successWhen(ForestRequest req, ForestResponse res) 回调函数: 请求是否成功 -
com.dtflys.forest.exceptions中ForestResponse的使用
参数类型为ForestResponse的com.dtflys.forest.exceptions中的构造器限定符构造器说明ForestHandlerException(String message, ForestRequest request, ForestResponse response) ForestHandlerException(String message, Throwable cause, ForestRequest request, ForestResponse response) ForestHandlerException(Throwable cause, ForestRequest request, ForestResponse response) ForestNetworkException(String message, Integer statusCode, ForestResponse response) -
com.dtflys.forest.handler中ForestResponse的使用
参数类型为ForestResponse的com.dtflys.forest.handler中的方法修饰符和类型方法说明AutoOAuth2DefinitionHandler.getOAuth2Token(ForestResponse<String> response, Map map) OAuth2DefinitionHandler.getOAuth2Token(ForestResponse<String> response, Map map) 处理认证响应实体ResultHandler.getResult(ForestRequest request, ForestResponse response, Class resultClass) 进行转换并获取结果ResultHandler.getResult(ForestRequest request, ForestResponse response, Type resultType) 进行转换并获取结果ResultHandler.getResult(ForestRequest request, ForestResponse response, Type resultType, Class resultClass) voidLifeCycleHandler.handleCanceled(ForestRequest request, ForestResponse response) LifeCycleHandler.handleError(ForestRequest request, ForestResponse response) LifeCycleHandler.handleError(ForestRequest request, ForestResponse response, Throwable ex) LifeCycleHandler.handleResultType(ForestRequest request, ForestResponse response) LifeCycleHandler.handleResultType(ForestRequest request, ForestResponse response, Type resultType, Class resultClass) voidLifeCycleHandler.handleSuccess(Object resultData, ForestRequest request, ForestResponse response) LifeCycleHandler.handleSync(ForestRequest request, ForestResponse response) LifeCycleHandler.handleSyncWithException(ForestRequest request, ForestResponse response, Throwable ex) protected booleanResultHandler.isReceivedResponseData(ForestResponse response) -
com.dtflys.forest.http中ForestResponse的使用
修饰符和类型方法说明ForestFuture.await()ForestResponseFactory.createResponse(ForestRequest<?> request, R res, LifeCycleHandler lifeCycleHandler, Throwable exception, Date requestTime) ForestRequest.executeAsResponse()执行请求发送过程,并获取响应类型结果ForestRequest.getPrevResponse()获取重定向的上一个响应ForestFuture.getResponse()protected ForestResponseForestResponse.getResponse()protected abstract ForestResponseResultGetter.getResponse()参数类型为ForestResponse的com.dtflys.forest.http中的方法修饰符和类型方法说明ForestRequest.canRetry(ForestResponse<?> response) 是否能够重试final ForestRetryExceptionForestRequest.canRetry(ForestResponse<?> response, ForestRetryException ex) 是否能重试类型变量类型为ForestResponse的com.dtflys.forest.http中的构造器参数 -
com.dtflys.forest.interceptor中ForestResponse的使用
修饰符和类型方法说明default voidInterceptor.afterExecute(ForestRequest request, ForestResponse response) 默认回调函数: 请求完成后(成功/失败后) 调用该方法voidInterceptorChain.afterExecute(ForestRequest request, ForestResponse response) default voidInterceptor.onCanceled(ForestRequest req, ForestResponse res) 默认回调函数: 请求取消后调用该方法voidInterceptorChain.onCanceled(ForestRequest request, ForestResponse response) default voidInterceptor.onError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) 默认回调函数: 请求失败后调用该方法voidInterceptorChain.onError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) default voidInterceptor.onRedirection(ForestRequest<?> redirectReq, ForestRequest<?> prevReq, ForestResponse<?> prevRes) 默认回调函数:在请求重定向时触发voidInterceptorChain.onRedirection(ForestRequest redirectReq, ForestRequest prevReq, ForestResponse prevRes) default voidInterceptor.onRetry(ForestRequest request, ForestResponse response) 默认回调函数: 在触发请求重试时执行voidInterceptorChain.onRetry(ForestRequest request, ForestResponse response) default voidInterceptor.onSuccess(T data, ForestRequest request, ForestResponse response) 默认回调函数: 请求成功后调用该方法voidInterceptorChain.onSuccess(Object data, ForestRequest request, ForestResponse response) -
com.dtflys.forest.lifecycles中ForestResponse的使用
修饰符和类型方法说明default voidBaseAnnotationLifeCycle.onError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) default voidMethodAnnotationLifeCycle.onError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) default voidParameterAnnotationLifeCycle.onError(ForestRuntimeException ex, ForestRequest request, ForestResponse response) default voidBaseAnnotationLifeCycle.onSuccess(I data, ForestRequest request, ForestResponse response) default voidMethodAnnotationLifeCycle.onSuccess(I data, ForestRequest request, ForestResponse response) default voidParameterAnnotationLifeCycle.onSuccess(I data, ForestRequest request, ForestResponse response) -
com.dtflys.forest.lifecycles.authorization中ForestResponse的使用
-
com.dtflys.forest.lifecycles.file中ForestResponse的使用
修饰符和类型方法说明voidDownloadLifeCycle.onSuccess(Object data, ForestRequest request, ForestResponse response) -
com.dtflys.forest.logging中ForestResponse的使用
参数类型为ForestResponse的com.dtflys.forest.logging中的构造器 -
com.dtflys.forest.reflection中ForestResponse的使用
修饰符和类型方法说明voidMethodLifeCycleHandler.handleCanceled(ForestRequest request, ForestResponse response) voidNoneLifeCycleHandler.handleCanceled(ForestRequest request, ForestResponse response) MethodLifeCycleHandler.handleError(ForestRequest request, ForestResponse response) MethodLifeCycleHandler.handleError(ForestRequest request, ForestResponse response, Throwable ex) NoneLifeCycleHandler.handleError(ForestRequest request, ForestResponse response) NoneLifeCycleHandler.handleError(ForestRequest request, ForestResponse response, Throwable ex) MethodLifeCycleHandler.handleResultType(ForestRequest request, ForestResponse response) MethodLifeCycleHandler.handleResultType(ForestRequest request, ForestResponse response, Type resultType, Class resultClass) NoneLifeCycleHandler.handleResultType(ForestRequest request, ForestResponse response) NoneLifeCycleHandler.handleResultType(ForestRequest request, ForestResponse response, Type resultType, Class resultClass) voidMethodLifeCycleHandler.handleSuccess(Object resultData, ForestRequest request, ForestResponse response) voidNoneLifeCycleHandler.handleSuccess(Object resultData, ForestRequest request, ForestResponse response) MethodLifeCycleHandler.handleSync(ForestRequest request, ForestResponse response) NoneLifeCycleHandler.handleSync(ForestRequest request, ForestResponse response) MethodLifeCycleHandler.handleSyncWithException(ForestRequest request, ForestResponse response, Throwable ex) NoneLifeCycleHandler.handleSyncWithException(ForestRequest request, ForestResponse response, Throwable ex)