Retrofit
2017-02-28 15:02:05 7 举报
retrofit 类图
作者其他创作
大纲/内容
GsonConverterFactory
-gson: Gson
RelativeUrl
Path
Header
ExecutorCallbackCall
callbackExecutor: Executordelegate: Call
+ enqueue(Callback callback)......
HeaderMap
Query
ParameterHandler的apply()调用中,会将注解解析出来处理后的数据添加到一个RequestBuilder中,最后调用RequestBuilder的build()得到okhttp3.Request对象
RawPart
FieldMap
Retrofit
callFactory:okhttp3.Call.Factory baseUrl: HttpUrl converterFactories : List adapterFactories: List callbackExecutor: Executor
Okhttpcall
serviceMethod: ServiceMethodargs: Object[]rawCall: okhttp3.Callexecuted: booleancanceled: booleancreationFailure: Throwable
+ request(): Request- createRawCall(): okhttp3.Call+ enqueue(Callback callback)+ execute(): ResponseparseResponse(okhttp3.Response rawResponse): Response+ cancel()+ isCanceled()
Body
Part
adapt(Call call): TresponseType(): Type
RequestBuilder
- requestBuilder: Request.Builder
Field
Callback
Call
execute()enqueue(Callback callback)isExecuted(): booleancancel()isCanceled(): booleanclone(): Callrequest(): Request
ParameterHandler
QueryMap
DefaultCallAdapterFactory
INSTANCE: CallAdapter.Factory
Converter$Factory
toRequest(Object... args): RequesttoResponse(ResponseBody body): R
conver(F value): T
PartMap
CallAdapter$Factory
ExecutorCallAdapterFactory
callbackExecutor: Executor
Response
rawResponse: okhttp2.Responsebody: TerrorBody: ResponseBody
0 条评论
回复 删除
下一页