APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Microless
版本号:1.9
包名称:com.itplus.microless

MD5 校验值:76664d4beb7b8d8b1df7e59ba4c77a12

反编译源代码说明

ChatVisitorClient.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package zendesk.chat;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import s7.e;
import s7.f;
import vb.g;
import yc.a0;
import zendesk.chat.ChatSocketClient;

public class ChatVisitorClient {
    private static final String BASE_URL = "wss://widget-mediator.zopim.com";
    private static final String USER_AGENT_FORMAT = "%s %s/%s-%s %s/%s";
    private final ChatSocketClient chatSocketClient;
    private final NetworkConnectivity connectivity;
    private final e gson;
    private final ScheduledExecutorService scheduledExecutorService;
    private final String sourceVersion;
    private final String userAgent;

    public static class Builder {
        private NetworkConnectivity networkConnectivity;
        private a0 okHttpClient;
        private ScheduledExecutorService scheduledExecutorService;
        private String appName = "_";
        private String appVersion = "_";
        private String sdkName = "_";
        private String sdkVersion = "_";
        private String baseUrl = ChatVisitorClient.BASE_URL;

        public ChatVisitorClient build() {
            Object[] objArr = new Object[6];
            objArr[0] = g.a(System.getProperty("http.agent"));
            objArr[1] = this.appName;
            objArr[2] = this.appVersion;
            objArr[3] = Character.valueOf(this.baseUrl.contains("zopim.com") ? 'p' : 'd');
            objArr[4] = this.sdkName;
            objArr[5] = this.sdkVersion;
            String format = String.format(ChatVisitorClient.USER_AGENT_FORMAT, objArr);
            if (this.networkConnectivity == null) {
                this.networkConnectivity = new NetworkConnectivity();
            }
            if (this.okHttpClient == null) {
                this.okHttpClient = new a0();
            }
            if (this.scheduledExecutorService == null) {
                this.scheduledExecutorService = Executors.newScheduledThreadPool(5);
            }
            return new ChatVisitorClient(format, this.sdkVersion, new ChatSocketClient.Builder(new MediatorEndpoint(this.baseUrl + "/s/W", Clock.SYSTEM_CLOCK)).withScheduledExecutorService(this.scheduledExecutorService).withExecutor(this.scheduledExecutorService).withOkHttpClient(this.okHttpClient).build(), this.scheduledExecutorService, new f().e().b(), this.networkConnectivity);
        }

        public Builder withAppInfo(String str, String str2) {
            if (g.c(str)) {
                this.appName = str.replaceAll(" ", "");
            }
            if (g.c(str2)) {
                this.appVersion = str2.replaceAll(" ", "");
            }
            return this;
        }

        public Builder withBaseUrl(String str) {
            if (g.c(str)) {
                this.baseUrl = str;
            }
            return this;
        }

        public Builder withNetworkConnectivity(NetworkConnectivity networkConnectivity) {
            this.networkConnectivity = networkConnectivity;
            return this;
        }

        public Builder withOkHttpClient(a0 a0Var) {
            this.okHttpClient = a0Var;
            return this;
        }

        public Builder withScheduledExecutorService(ScheduledExecutorService scheduledExecutorService) {
            this.scheduledExecutorService = scheduledExecutorService;
            return this;
        }

        public Builder withSdkInfo(String str, String str2) {
            if (g.c(str)) {
                this.sdkName = str.replaceAll(" ", "");
            }
            if (g.c(str2)) {
                this.sdkVersion = str2.replaceAll(" ", "");
            }
            return this;
        }
    }

    private ChatVisitorClient(String str, String str2, ChatSocketClient chatSocketClient, ScheduledExecutorService scheduledExecutorService, e eVar, NetworkConnectivity networkConnectivity) {
        this.userAgent = str;
        this.sourceVersion = str2;
        this.chatSocketClient = chatSocketClient;
        this.scheduledExecutorService = scheduledExecutorService;
        this.gson = eVar;
        this.connectivity = networkConnectivity;
    }

    public ChatSession createNewSession(String str, String str2, String str3, VisitorPath visitorPath) {
        return new DefaultChatSession(this.chatSocketClient, LoginDetails.forVisitor(str, str2, this.userAgent, this.sourceVersion, str3, visitorPath.getTitle(), visitorPath.getUrl()), this.gson, this.scheduledExecutorService, this.connectivity);
    }
}