类 DefaultGtInterceptor
- java.lang.Object
-
- com.getui.push.v2.sdk.core.handler.impl.DefaultGtInterceptor
-
- 所有已实现的接口:
GtInterceptor
public class DefaultGtInterceptor extends Object implements GtInterceptor
create by getui on 2020/9/28- 作者:
- getui
-
-
构造器概要
构造器 构造器 说明 DefaultGtInterceptor(HostManager hostManager, BlockingQueue<StateWrapper> reportDataQueue, GtApiConfiguration configuration)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidafterCompletion(GtApiProxyFactory.ApiParam apiParam, Map<String,Object> header, String body, String result)http请求后调用,不管成功或者失败都会调用StateWrappergetAndRemove(String host)voidhandleException(GtApiProxyFactory.ApiParam apiParam, Map<String,Object> header, String body, ApiException e)报错时调用此方法voidpost(GtApiProxyFactory.ApiParam apiParam, Map<String,Object> header, String body, String result)http请求成功后调用此方法voidpre(GtApiProxyFactory.ApiParam apiParam, Map<String,Object> header, String body)http请求前调用
-
-
-
构造器详细资料
-
DefaultGtInterceptor
public DefaultGtInterceptor(HostManager hostManager, BlockingQueue<StateWrapper> reportDataQueue, GtApiConfiguration configuration)
-
-
方法详细资料
-
pre
public void pre(GtApiProxyFactory.ApiParam apiParam, Map<String,Object> header, String body)
从接口复制的说明:GtInterceptorhttp请求前调用- 指定者:
pre在接口中GtInterceptor- 参数:
apiParam- 请求参数header- 请求headerbody- 请求body
-
post
public void post(GtApiProxyFactory.ApiParam apiParam, Map<String,Object> header, String body, String result)
从接口复制的说明:GtInterceptorhttp请求成功后调用此方法- 指定者:
post在接口中GtInterceptor- 参数:
apiParam- 请求参数header- 请求headerbody- 请求bodyresult- 返回值
-
handleException
public void handleException(GtApiProxyFactory.ApiParam apiParam, Map<String,Object> header, String body, ApiException e)
从接口复制的说明:GtInterceptor报错时调用此方法- 指定者:
handleException在接口中GtInterceptor- 参数:
apiParam- 请求参数header- 请求headerbody- 请求bodye- 异常信息
-
afterCompletion
public void afterCompletion(GtApiProxyFactory.ApiParam apiParam, Map<String,Object> header, String body, String result)
从接口复制的说明:GtInterceptorhttp请求后调用,不管成功或者失败都会调用- 指定者:
afterCompletion在接口中GtInterceptor- 参数:
apiParam- 请求参数header- 请求headerbody- 请求bodyresult- 返回值
-
getAndRemove
public StateWrapper getAndRemove(String host)
-
-