- 博客(11)
- 资源 (9)
- 收藏
- 关注
原创 okHttp3 Protocol
okHttp3 Protocolpublic enum Protocol { HTTP_1_0("http/1.0"), HTTP_1_1("http/1.1"), SPDY_3("spdy/3.1"), HTTP_2("h2"), H2_PRIOR_KNOWLEDGE("h2_prior_knowledge"), QUIC("quic"); p
2018-10-18 23:15:13 2229
原创 OkHttp3 Proxy
OkHttp3 Proxy每次我看到代理,都感到特激动,因为我也不会;public class Proxy { /** * Represents the proxy type. * * @since 1.5 */ public enum Type { /** * Represents a direct...
2018-10-16 17:40:51 3975
原创 OkHttp3 Dispatcher
OkHttp3 Dispatcher调度器public final class Dispatcher { private int maxRequests = 64; private int maxRequestsPerHost = 5; private @Nullable Runnable idleCallback; /** Executes calls. Created l...
2018-10-16 15:19:38 1143
原创 EventBus 源码解析
EventBus 源码解析看个大图:再来一个:使用起来比较简单EventBus.getDefault().register(Object);EventBus.getDefault().unregister(Object);EventBus.getDefault().post(Object);@Subscribe(threadMode=ThreadMode.MAIN)pub...
2018-10-10 14:38:40 151
原创 EventBus 索引SampleBusIndex
EventBus 索引SampleBusIndex// 加载索引,添加到默认配置的EventBusEventBus.builder().addIndex(new SampleBusIndex()).installDefaultEventBus();/** Adds an index generated by EventBus' annotation preprocessor. */pub...
2018-10-08 14:19:21 317
原创 EventBus 线程调度 threadMode
EventBus 线程调度 threadModeprivate void postToSubscription(Subscription subscription, Object event, boolean isMainThread) { switch (subscription.subscriberMethod.threadMode) { case P...
2018-10-08 12:05:30 547
原创 EventBus 黏性事件的postSticky
EventBus 黏性事件的stickyEvents /** * Posts the given event to the event bus and holds on to the event (because it is sticky). The most recent sticky * event of an event's type is kept in mem...
2018-10-08 10:40:24 679
原创 EventBus 黏性事件的register
EventBus 黏性事件的register跟在普通事件的register后面:// Must be called in synchronized block private void subscribe(Object subscriber, SubscriberMethod subscriberMethod) { ...... if (subscrib...
2018-10-08 09:45:23 193
原创 EventBus 普通事件的unregister
EventBus 普通事件的unregister/** Unregisters the given subscriber from all event classes. */ public synchronized void unregister(Object subscriber) { List<Class<?>> subscribedTypes...
2018-10-05 01:30:03 921
原创 EventBus 普通事件的post
EventBus 普通事件的post当订阅事件完成后,就需要发送时间通知了,调用比较简单EventBus.getDefault().post(eventType);看一下post事件:/** Posts the given event to the event bus. */ public void post(Object event) { PostingThre...
2018-10-05 01:02:06 1233
原创 EventBus 普通事件register
EventBus 普通事件registerpublic void register(Object subscriber) { Class<?> subscriberClass = subscriber.getClass(); List<SubscriberMethod> subscriberMethods = subscriberMetho...
2018-10-04 11:59:25 981
MPAndroidChart的样例apk
2018-04-24
MySQL数据库入门--读书笔记(word)
2016-11-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人