From 61b2b16776247cf86b08796ec4f79f5a228bac12 Mon Sep 17 00:00:00 2001 From: xiaowusky <365019403@qq.com> Date: Wed, 23 Feb 2022 17:33:18 +0800 Subject: [PATCH] CommonLoader --- .../common/commonlib/net/CommonLoader.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 commonLib/src/main/java/com/common/commonlib/net/CommonLoader.java diff --git a/commonLib/src/main/java/com/common/commonlib/net/CommonLoader.java b/commonLib/src/main/java/com/common/commonlib/net/CommonLoader.java new file mode 100644 index 0000000..23061d5 --- /dev/null +++ b/commonLib/src/main/java/com/common/commonlib/net/CommonLoader.java @@ -0,0 +1,25 @@ +package com.common.commonlib.net; + +import androidx.annotation.NonNull; + +import java.util.ArrayList; +import java.util.List; + +import okhttp3.Interceptor; + +public class CommonLoader extends BaseObserve { + + public CommonLoader(@NonNull Class clazz) { + this(clazz, getBaseInterceptors()); + } + + public CommonLoader(@NonNull Class clazz, @NonNull List interceptors) { + super(clazz, interceptors); + } + + private static List getBaseInterceptors() { + List interceptors = new ArrayList<>(); + //interceptors.add(new SessionExpiredInterceptor()); + return interceptors; + } +}