/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.http.HttpConstants
 *  com.l7tech.gateway.common.Component
 *  com.l7tech.gateway.common.LicenseManager
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.audit.SystemMessages
 *  com.l7tech.gateway.common.security.keystore.SsgKeyEntry
 *  com.l7tech.gateway.common.transport.SsgConnector
 *  com.l7tech.gateway.common.transport.SsgConnector$Endpoint
 *  com.l7tech.gateway.common.transport.TransportDescriptor
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.objectmodel.SaveException
 *  com.l7tech.util.CollectionUtils
 *  com.l7tech.util.Config
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.Functions$UnaryVoid
 *  com.l7tech.util.InetAddressUtil
 *  com.l7tech.util.MasterPasswordManager
 *  com.l7tech.util.Pair
 *  com.l7tech.util.SyspropUtil
 *  com.l7tech.util.ValidationUtils
 *  jakarta.security.auth.message.config.AuthConfigFactory
 *  jakarta.servlet.ServletRequest
 *  jakarta.servlet.http.HttpServletRequest
 *  jakarta.servlet.http.HttpServletResponse
 *  org.apache.catalina.Container
 *  org.apache.catalina.Context
 *  org.apache.catalina.Engine
 *  org.apache.catalina.Executor
 *  org.apache.catalina.Host
 *  org.apache.catalina.LifecycleException
 *  org.apache.catalina.LifecycleListener
 *  org.apache.catalina.Loader
 *  org.apache.catalina.Manager
 *  org.apache.catalina.Valve
 *  org.apache.catalina.WebResourceRoot
 *  org.apache.catalina.connector.Connector
 *  org.apache.catalina.core.StandardContext
 *  org.apache.catalina.core.StandardHost
 *  org.apache.catalina.core.StandardThreadExecutor
 *  org.apache.catalina.core.StandardWrapper
 *  org.apache.catalina.loader.WebappLoader
 *  org.apache.catalina.startup.Tomcat
 *  org.apache.catalina.webresources.StandardRoot
 *  org.apache.catalina.webresources.TomcatURLStreamHandlerFactory
 *  org.apache.tomcat.JarScanner
 *  org.apache.tomcat.util.net.SSLHostConfig$CertificateVerification
 *  org.jetbrains.annotations.Nullable
 *  org.jetbrains.annotations.VisibleForTesting
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationEvent
 */
package com.l7tech.server.transport.http;

import com.l7tech.common.http.HttpConstants;
import com.l7tech.gateway.common.Component;
import com.l7tech.gateway.common.LicenseManager;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.audit.SystemMessages;
import com.l7tech.gateway.common.security.keystore.SsgKeyEntry;
import com.l7tech.gateway.common.transport.SsgConnector;
import com.l7tech.gateway.common.transport.TransportDescriptor;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.server.DefaultKey;
import com.l7tech.server.LifecycleException;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.audit.AuditContextUtils;
import com.l7tech.server.event.EntityInvalidationEvent;
import com.l7tech.server.event.system.ReadyForMessages;
import com.l7tech.server.event.system.TransportEvent;
import com.l7tech.server.identity.cert.TrustedCertServices;
import com.l7tech.server.security.keystore.KeystoreFile;
import com.l7tech.server.service.BundleBootstrapCompleteEvent;
import com.l7tech.server.tomcat.ConnectionIdValve;
import com.l7tech.server.tomcat.ResponseKillerValve;
import com.l7tech.server.tomcat.SsgAbstractHttp11JsseProtocol;
import com.l7tech.server.tomcat.SsgContextConfig;
import com.l7tech.server.tomcat.SsgErrorReportValve;
import com.l7tech.server.tomcat.SsgHttpConstants;
import com.l7tech.server.tomcat.SsgNopTomcatJarScanner;
import com.l7tech.server.transport.ListenerException;
import com.l7tech.server.transport.SsgConnectorActivationEvent;
import com.l7tech.server.transport.SsgConnectorDeactivationEvent;
import com.l7tech.server.transport.SsgConnectorManager;
import com.l7tech.server.transport.TransportModule;
import com.l7tech.server.transport.http.DefaultHttpConnectors;
import com.l7tech.server.transport.http.HttpTransportModuleWebappClassLoader;
import com.l7tech.server.transport.http.SsgDefaultServlet;
import com.l7tech.server.transport.http.h;
import com.l7tech.server.transport.http.i;
import com.l7tech.server.transport.http.q;
import com.l7tech.server.transport.http.websocket.SsgWebSocketManager;
import com.l7tech.util.CollectionUtils;
import com.l7tech.util.Config;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.Functions;
import com.l7tech.util.InetAddressUtil;
import com.l7tech.util.MasterPasswordManager;
import com.l7tech.util.Pair;
import com.l7tech.util.SyspropUtil;
import com.l7tech.util.ValidationUtils;
import jakarta.security.auth.message.config.AuthConfigFactory;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.IOException;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.security.KeyStoreException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.EnumSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.catalina.Container;
import org.apache.catalina.Context;
import org.apache.catalina.Engine;
import org.apache.catalina.Host;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.Loader;
import org.apache.catalina.Manager;
import org.apache.catalina.Valve;
import org.apache.catalina.WebResourceRoot;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.core.StandardHost;
import org.apache.catalina.core.StandardThreadExecutor;
import org.apache.catalina.core.StandardWrapper;
import org.apache.catalina.loader.WebappLoader;
import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.webresources.StandardRoot;
import org.apache.catalina.webresources.TomcatURLStreamHandlerFactory;
import org.apache.tomcat.JarScanner;
import org.apache.tomcat.util.net.SSLHostConfig;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.VisibleForTesting;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;

public class HttpTransportModule
extends TransportModule
implements PropertyChangeListener {
    private static final Logger l;
    public static final String CONNECTOR_ATTR_TRANSPORT_MODULE_ID;
    public static final String CONNECTOR_ATTR_CONNECTOR_OID;
    public static final String INIT_PARAM_INSTANCE_ID;
    static final String m;
    static final String n;
    static final String o;
    private static final String p;
    private static final String q;
    private static final String r;
    private static final String s;
    @VisibleForTesting
    static final String t;
    private static final String u;
    private static final String v;
    protected static final String HSTS_CONNECTOR_PROPERTY;
    private static final String w;
    private static final String x;
    private static final AtomicLong y;
    private static final Map<Long, Reference<HttpTransportModule>> z;
    static boolean A;
    static final String B;
    static SsgConnector C;
    static HttpTransportModule D;
    private final long E;
    private final Set<String> F;
    private final AtomicBoolean G;
    private final AtomicBoolean H;
    private final AtomicInteger I;
    private final ServerConfig J;
    private final MasterPasswordManager K;
    private final Map<Goid, Pair<SsgConnector, Connector>> L;
    private final Map<Goid, AtomicInteger> M;
    private final Map<Goid, Integer> N;
    private final AtomicLong O;
    private Tomcat P;
    private StandardThreadExecutor Q;
    private static final String[] T;

    public HttpTransportModule(ServerConfig serverConfig, MasterPasswordManager masterPasswordManager, DefaultKey defaultKey, LicenseManager licenseManager, SsgConnectorManager ssgConnectorManager, TrustedCertServices trustedCertServices) {
        String[] stringArray = T;
        super(stringArray[47], Component.GW_HTTPRECV, l, stringArray[80], licenseManager, ssgConnectorManager, trustedCertServices, defaultKey, (Config)serverConfig);
        this.F = CollectionUtils.caseInsensitiveSet((String[])new String[]{SsgConnector.SCHEME_HTTP, SsgConnector.SCHEME_HTTPS});
        this.G = new AtomicBoolean(false);
        this.H = new AtomicBoolean(false);
        this.I = new AtomicInteger();
        this.L = new ConcurrentHashMap<Goid, Pair<SsgConnector, Connector>>();
        this.M = new ConcurrentHashMap<Goid, AtomicInteger>();
        this.N = new ConcurrentHashMap<Goid, Integer>();
        this.O = new AtomicLong();
        this.J = serverConfig;
        this.K = masterPasswordManager;
        this.E = y.getAndIncrement();
        z.put(this.E, new WeakReference<HttpTransportModule>(this));
    }

    private void a() throws LifecycleException {
        File file;
        String[] stringArray;
        block13: {
            try {
                if (!this.G.compareAndSet(false, true)) {
                    return;
                }
            }
            catch (LifecycleException lifecycleException) {
                throw HttpTransportModule.a(lifecycleException);
            }
            TomcatURLStreamHandlerFactory.disable();
            AuthConfigFactory.getFactory();
            this.P = new Tomcat();
            this.P.setHostname(InetAddressUtil.getLocalHostName());
            stringArray = T;
            this.P.setBaseDir(System.getProperty(stringArray[14]));
            this.P.getServer();
            this.P.enableNaming();
            this.P.setAddDefaultWebXmlToWebapp(false);
            int n2 = this.J.getIntProperty(stringArray[20], 200);
            int n3 = this.J.getIntProperty(stringArray[35], n2 / 2);
            this.Q = this.a(stringArray[59], n3, n2);
            this.P.getService().addExecutor((org.apache.catalina.Executor)this.Q);
            Engine engine = this.P.getEngine();
            engine.setName(stringArray[86]);
            engine.setDefaultHost(InetAddressUtil.getLocalHostName());
            engine.setService(this.P.getService());
            file = this.J.getLocalDirectoryProperty(stringArray[111], null, false);
            try {
                if (file == null) {
                    throw new LifecycleException(stringArray[56]);
                }
            }
            catch (LifecycleException lifecycleException) {
                throw HttpTransportModule.a(lifecycleException);
            }
            try {
                try {
                    if (file.exists() && file.isDirectory()) break block13;
                }
                catch (LifecycleException lifecycleException) {
                    throw HttpTransportModule.a(lifecycleException);
                }
                throw new LifecycleException(T[123] + file.getPath());
            }
            catch (LifecycleException lifecycleException) {
                throw HttpTransportModule.a(lifecycleException);
            }
        }
        String string = file.getAbsolutePath();
        Host host = this.P.getHost();
        host.setAppBase(string);
        host.getPipeline().addValve((Valve)new ConnectionIdValve(this));
        host.getPipeline().addValve((Valve)new ResponseKillerValve());
        ((StandardHost)host).setErrorReportValveClass(SsgErrorReportValve.class.getName());
        stringArray = T;
        StandardContext standardContext = (StandardContext)this.P.addWebapp(host, "", string, (LifecycleListener)new SsgContextConfig(this.getApplicationContext().containsBean(stringArray[50])));
        String string2 = this.J.getProperty(stringArray[138]);
        standardContext.setSessionCookieName(string2);
        String string3 = this.J.getProperty(stringArray[141]);
        try {
            if (string3 != null) {
                standardContext.setWorkDir(string3 + File.separatorChar + stringArray[39]);
            }
        }
        catch (LifecycleException lifecycleException) {
            throw HttpTransportModule.a(lifecycleException);
        }
        standardContext.setManager((Manager)new q(this));
        stringArray = T;
        standardContext.addParameter(stringArray[1], Long.toString(this.E));
        standardContext.setName(stringArray[23]);
        standardContext.addMimeMapping(stringArray[112], stringArray[9]);
        standardContext.addMimeMapping(stringArray[28], stringArray[133]);
        standardContext.addMimeMapping(stringArray[127], stringArray[17]);
        standardContext.addMimeMapping(stringArray[37], stringArray[61]);
        standardContext.addMimeMapping(stringArray[12], stringArray[77]);
        standardContext.addMimeMapping(stringArray[70], stringArray[24]);
        standardContext.addMimeMapping(stringArray[43], stringArray[137]);
        standardContext.addMimeMapping(stringArray[73], stringArray[142]);
        standardContext.addMimeMapping(stringArray[41], stringArray[131]);
        StandardWrapper standardWrapper = (StandardWrapper)standardContext.createWrapper();
        standardWrapper.setServletClass(SsgDefaultServlet.class.getName());
        standardWrapper.setName(stringArray[76]);
        standardWrapper.setLoadOnStartup(1);
        standardContext.addChild((Container)standardWrapper);
        standardContext.addServletMappingDecoded("/", stringArray[68]);
        StandardRoot standardRoot = new StandardRoot((Context)standardContext);
        standardContext.setResources((WebResourceRoot)standardRoot);
        standardContext.setJarScanner((JarScanner)new SsgNopTomcatJarScanner());
        standardContext.setParentClassLoader(this.getClass().getClassLoader());
        WebappLoader webappLoader = new WebappLoader();
        webappLoader.setDelegate(standardContext.getDelegate());
        webappLoader.setLoaderClass(HttpTransportModuleWebappClassLoader.class.getName());
        standardContext.setLoader((Loader)webappLoader);
        host.addChild((Container)standardContext);
    }

    @Override
    public boolean isLicensed() {
        return true;
    }

    @Override
    public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
        block9: {
            try {
                if (this.Q == null) {
                    return;
                }
            }
            catch (org.apache.catalina.LifecycleException lifecycleException) {
                throw HttpTransportModule.a((Exception)((Object)lifecycleException));
            }
            String string = propertyChangeEvent.getPropertyName();
            try {
                if (!T[27].equals(string) && !T[124].equals(string)) break block9;
            }
            catch (org.apache.catalina.LifecycleException lifecycleException) {
                throw HttpTransportModule.a((Exception)((Object)lifecycleException));
            }
            try {
                block11: {
                    int n2;
                    int n3;
                    block10: {
                        String[] stringArray = T;
                        n3 = this.J.getIntProperty(stringArray[20], 200);
                        n2 = this.J.getIntProperty(stringArray[35], n3 / 2);
                        Pair<Integer, Integer> pair = this.a(n2, n3);
                        n2 = (Integer)pair.left;
                        n3 = (Integer)pair.right;
                        try {
                            l.info(stringArray[51] + n2 + stringArray[117] + n3);
                            if (n3 <= this.Q.getMaxThreads()) break block10;
                            this.Q.setMaxThreads(n3);
                            this.Q.setMinSpareThreads(n2);
                            break block11;
                        }
                        catch (org.apache.catalina.LifecycleException lifecycleException) {
                            throw HttpTransportModule.a((Exception)((Object)lifecycleException));
                        }
                    }
                    this.Q.setMinSpareThreads(n2);
                    this.Q.setMaxThreads(n3);
                }
                this.Q.stop();
                this.Q.start();
            }
            catch (org.apache.catalina.LifecycleException lifecycleException) {
                String[] stringArray = T;
                String string2 = stringArray[100] + propertyChangeEvent.getPropertyName() + stringArray[116] + ExceptionUtils.getMessage((Throwable)lifecycleException);
                l.log(Level.SEVERE, string2, lifecycleException);
                this.getApplicationContext().publishEvent((ApplicationEvent)new TransportEvent(this, Component.GW_HTTPRECV, null, Level.WARNING, stringArray[53], string2));
            }
        }
    }

    private Pair<Integer, Integer> a(int n2, int n3) {
        block8: {
            block7: {
                try {
                    if (n3 >= 1 && n3 <= 100000) break block7;
                }
                catch (RuntimeException runtimeException) {
                    throw HttpTransportModule.a(runtimeException);
                }
                n3 = 40;
            }
            try {
                if (n2 >= 0 || n2 <= -1000) break block8;
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
            n2 = n3 / Math.abs(n2);
        }
        if (n2 < 1) {
            n2 = 1;
        } else if (n2 > n3) {
            n2 = n3;
        }
        return new Pair((Object)n2, (Object)n3);
    }

    private StandardThreadExecutor a(String string, int n2, int n3) {
        Pair<Integer, Integer> pair = this.a(n2, n3);
        n2 = (Integer)pair.left;
        n3 = (Integer)pair.right;
        StandardThreadExecutor standardThreadExecutor = new StandardThreadExecutor();
        standardThreadExecutor.setName(string);
        standardThreadExecutor.setDaemon(true);
        String[] stringArray = T;
        standardThreadExecutor.setMaxIdleTime(this.J.getIntProperty(stringArray[96], 60000));
        standardThreadExecutor.setMaxThreads(n3);
        standardThreadExecutor.setMinSpareThreads(n2);
        standardThreadExecutor.setNamePrefix(stringArray[99] + string + "-");
        return standardThreadExecutor;
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    void b() throws LifecycleException {
        try {
            if (!this.H.compareAndSet(false, true)) {
                return;
            }
        }
        catch (org.apache.catalina.LifecycleException lifecycleException) {
            throw HttpTransportModule.a((Exception)((Object)lifecycleException));
        }
        boolean bl2 = false;
        try {
            this.a();
            String[] stringArray = T;
            this.logger.log(Level.INFO, stringArray[143], w);
            this.P.start();
            this.Q.start();
            bl2 = true;
        }
        catch (org.apache.catalina.LifecycleException lifecycleException) {
            try {
                String[] stringArray2 = T;
                String string = stringArray2[125] + ExceptionUtils.getMessage((Throwable)lifecycleException);
                this.auditError(stringArray2[40], string, ExceptionUtils.getDebugException((Throwable)lifecycleException));
                throw new LifecycleException(lifecycleException);
            }
            catch (Throwable throwable) {
                try {
                    if (bl2) throw throwable;
                    this.H.set(false);
                    throw throwable;
                }
                catch (org.apache.catalina.LifecycleException lifecycleException2) {
                    throw HttpTransportModule.a((Exception)((Object)lifecycleException2));
                }
            }
        }
        try {
            if (bl2) return;
            this.H.set(false);
            return;
        }
        catch (org.apache.catalina.LifecycleException lifecycleException) {
            throw HttpTransportModule.a((Exception)((Object)lifecycleException));
        }
    }

    /*
     * WARNING - void declaration
     */
    @Override
    protected void doStop() throws LifecycleException {
        org.apache.catalina.Executor[] executorArray;
        try {
            if (!this.H.get()) {
                return;
            }
        }
        catch (Exception exception) {
            throw HttpTransportModule.a(exception);
        }
        try {
            executorArray = new ArrayList(this.L.keySet());
            for (Goid goid : executorArray) {
                this.removeConnector(goid);
            }
        }
        catch (Exception exception) {
            String[] stringArray = T;
            this.auditError(stringArray[16], stringArray[81], exception);
        }
        try {
            void var3_8;
            this.P.getServer();
            this.P.stop();
            this.H.set(false);
            this.d();
            executorArray = this.P.getService().findExecutors();
            int n2 = executorArray.length;
            boolean bl2 = false;
            while (var3_8 < n2) {
                org.apache.catalina.Executor executor = executorArray[var3_8];
                try {
                    if (executor != null) {
                        executor.stop();
                    }
                }
                catch (Exception exception) {
                    throw HttpTransportModule.a(exception);
                }
                ++var3_8;
            }
        }
        catch (org.apache.catalina.LifecycleException lifecycleException) {
            throw new LifecycleException(lifecycleException);
        }
    }

    @Override
    protected void doClose() throws LifecycleException {
        try {
            this.stop();
            this.P.destroy();
        }
        catch (org.apache.catalina.LifecycleException lifecycleException) {
            throw new LifecycleException(lifecycleException);
        }
        finally {
            z.remove(this.E);
        }
    }

    private void a(boolean bl2) throws ListenerException {
        boolean bl3 = AuditContextUtils.isSystem();
        String[] stringArray = T;
        boolean bl4 = this.J.getBooleanProperty(stringArray[3], false);
        try {
            if (bl4) {
                SyspropUtil.setProperty((String)stringArray[8], (String)String.valueOf(bl4));
            }
        }
        catch (FindException findException) {
            throw HttpTransportModule.a((Exception)((Object)findException));
        }
        try {
            AuditContextUtils.setSystem(true);
            Collection collection = this.ssgConnectorManager.findAll();
            boolean bl5 = false;
            for (SsgConnector ssgConnector : collection) {
                try {
                    if (!ssgConnector.isEnabled() || !this.connectorIsOwnedByThisModule(ssgConnector)) continue;
                }
                catch (FindException findException) {
                    throw HttpTransportModule.a((Exception)((Object)findException));
                }
                bl5 = true;
                this.a(bl2, ssgConnector);
            }
            try {
                if (!bl5) {
                    this.b(bl2);
                }
            }
            catch (FindException findException) {
                throw HttpTransportModule.a((Exception)((Object)findException));
            }
            this.a(collection, bl2);
        }
        catch (FindException findException) {
            throw new ListenerException(T[5] + ExceptionUtils.getMessage((Throwable)findException), findException);
        }
        finally {
            AuditContextUtils.setSystem(bl3);
        }
    }

    private void a(boolean bl2, SsgConnector ssgConnector) {
        try {
            if (!bl2) {
                return;
            }
        }
        catch (ListenerException listenerException) {
            throw HttpTransportModule.a(listenerException);
        }
        try {
            this.addConnector(ssgConnector);
        }
        catch (ListenerException listenerException) {
            String[] stringArray = T;
            this.auditError(stringArray[16], String.format(stringArray[49], ssgConnector.getScheme(), ssgConnector.getPort(), ExceptionUtils.getMessage((Throwable)listenerException)), ExceptionUtils.getDebugException((Throwable)listenerException));
        }
        catch (Exception exception) {
            String[] stringArray = T;
            Exception exception2 = ExceptionUtils.getMessage((Throwable)exception).contains(stringArray[72]) ? (Exception)ExceptionUtils.getDebugException((Throwable)exception) : exception;
            stringArray = T;
            this.auditError(stringArray[16], String.format(stringArray[49], ssgConnector.getScheme(), ssgConnector.getPort(), ExceptionUtils.getMessage((Throwable)exception)), exception2);
        }
    }

    private void b(boolean bl2) {
        Collection<SsgConnector> collection = DefaultHttpConnectors.getDefaultConnectors();
        for (SsgConnector ssgConnector : collection) {
            String[] stringArray;
            try {
                this.ssgConnectorManager.save((PersistentEntity)ssgConnector);
                if (!bl2) continue;
                this.addConnector(ssgConnector);
            }
            catch (SaveException saveException) {
                stringArray = T;
                l.log(Level.WARNING, stringArray[103] + ExceptionUtils.getMessage((Throwable)saveException), saveException);
            }
            catch (ListenerException listenerException) {
                stringArray = T;
                l.log(Level.WARNING, String.format(stringArray[119], ssgConnector.getScheme(), ssgConnector.getPort(), ExceptionUtils.getMessage((Throwable)listenerException)), ExceptionUtils.getDebugException((Throwable)listenerException));
            }
            catch (Exception exception) {
                l.log(Level.WARNING, String.format(T[49], ssgConnector.getScheme(), ssgConnector.getPort(), ExceptionUtils.getMessage((Throwable)exception)), exception);
            }
        }
    }

    private void a(Collection<SsgConnector> collection, boolean bl2) {
        Collection<SsgConnector> collection2 = DefaultHttpConnectors.getRequiredConnectors(collection);
        for (SsgConnector ssgConnector : collection2) {
            String[] stringArray;
            try {
                this.ssgConnectorManager.save((PersistentEntity)ssgConnector);
                if (!bl2) continue;
                this.addConnector(ssgConnector);
            }
            catch (SaveException saveException) {
                stringArray = T;
                l.log(Level.WARNING, stringArray[15] + ExceptionUtils.getMessage((Throwable)saveException), saveException);
            }
            catch (ListenerException listenerException) {
                stringArray = T;
                l.log(Level.WARNING, String.format(stringArray[49], ssgConnector.getScheme(), ssgConnector.getPort(), ExceptionUtils.getMessage((Throwable)listenerException)), ExceptionUtils.getDebugException((Throwable)listenerException));
            }
            catch (Exception exception) {
                l.log(Level.WARNING, String.format(T[49], ssgConnector.getScheme(), ssgConnector.getPort(), ExceptionUtils.getMessage((Throwable)exception)), exception);
            }
        }
    }

    @Override
    protected void addConnector(SsgConnector ssgConnector) throws ListenerException {
        block14: {
            String string;
            block15: {
                Map<String, Object> map;
                block13: {
                    try {
                        if (ssgConnector.getGoid().equals((Object)SsgConnector.DEFAULT_GOID)) {
                            throw new ListenerException(T[91]);
                        }
                    }
                    catch (ListenerException listenerException) {
                        throw HttpTransportModule.a(listenerException);
                    }
                    try {
                        if (this.isCurrent(ssgConnector.getGoid(), ssgConnector.getVersion())) {
                            return;
                        }
                    }
                    catch (ListenerException listenerException) {
                        throw HttpTransportModule.a(listenerException);
                    }
                    try {
                        this.removeConnector(ssgConnector.getGoid());
                        if (!this.connectorIsOwnedByThisModule(ssgConnector)) {
                            return;
                        }
                    }
                    catch (ListenerException listenerException) {
                        throw HttpTransportModule.a(listenerException);
                    }
                    ssgConnector = ssgConnector.getReadOnlyCopy();
                    map = this.a(ssgConnector);
                    String[] stringArray = T;
                    map.remove(stringArray[36]);
                    string = ssgConnector.getScheme();
                    try {
                        if (!SsgConnector.SCHEME_HTTP.equals(string)) break block13;
                        this.a(ssgConnector, ssgConnector.getPort(), map);
                        break block14;
                    }
                    catch (ListenerException listenerException) {
                        throw HttpTransportModule.a(listenerException);
                    }
                }
                try {
                    if (!SsgConnector.SCHEME_HTTPS.equals(string)) break block15;
                    this.b(ssgConnector, ssgConnector.getPort(), map);
                    break block14;
                }
                catch (ListenerException listenerException) {
                    throw HttpTransportModule.a(listenerException);
                }
            }
            l.log(Level.WARNING, T[48] + string);
        }
        this.c(ssgConnector);
    }

    @Override
    protected boolean isCurrent(Goid goid, int n2) {
        boolean bl2;
        block5: {
            block4: {
                Pair<SsgConnector, Connector> pair = this.L.get(goid);
                try {
                    try {
                        if (pair == null || ((SsgConnector)pair.left).getVersion() != n2) break block4;
                    }
                    catch (RuntimeException runtimeException) {
                        throw HttpTransportModule.a(runtimeException);
                    }
                    bl2 = true;
                    break block5;
                }
                catch (RuntimeException runtimeException) {
                    throw HttpTransportModule.a(runtimeException);
                }
            }
            bl2 = false;
        }
        boolean bl3 = bl2;
        return bl3;
    }

    /*
     * Unable to fully structure code
     */
    @VisibleForTesting
    Map<String, Object> a(SsgConnector var1_1) throws ListenerException {
        block21: {
            block19: {
                block18: {
                    var2_2 = new LinkedHashMap<String, Object>();
                    var9_3 = HttpTransportModule.T;
                    var2_2.put(var9_3[57], var9_3[29]);
                    var2_2.put(var9_3[64], var9_3[60]);
                    var2_2.put(var9_3[33], var9_3[78]);
                    var2_2.put(var9_3[10], var9_3[122]);
                    var3_4 = var1_1.getProperty(SsgConnector.PROP_BIND_ADDRESS);
                    try {
                        try {
                            if (var3_4 != null && !InetAddressUtil.isAnyHostAddress((String)var3_4)) break block18;
                        }
                        catch (ListenerException v0) {
                            throw HttpTransportModule.a(v0);
                        }
                        var2_2.remove(HttpTransportModule.T[52]);
                        break block19;
                    }
                    catch (ListenerException v1) {
                        throw HttpTransportModule.a(v1);
                    }
                }
                var9_3 = HttpTransportModule.T;
                var2_2.put(var9_3[104], this.ssgConnectorManager.translateBindAddress(var3_4, var1_1.getPort()));
            }
            var9_3 = HttpTransportModule.T;
            var2_2.put(var9_3[6], Long.toString(this.E));
            var2_2.put(var9_3[54], var1_1.getGoid().toString());
            if (SsgConnector.SCHEME_HTTPS.equals(var1_1.getScheme())) {
                block22: {
                    block20: {
                        var2_2.put(var9_3[32], var9_3[7]);
                        var2_2.put(var9_3[38], Boolean.toString(var1_1.isSecure()));
                        var4_5 = var1_1.getClientAuth();
                        try {
                            if (var4_5 != 1) break block20;
                            var2_2.put(var9_3[115], SSLHostConfig.CertificateVerification.REQUIRED);
                            break block21;
                        }
                        catch (ListenerException v2) {
                            throw HttpTransportModule.a(v2);
                        }
                    }
                    try {
                        if (var4_5 != 2) break block22;
                        var2_2.put(HttpTransportModule.T[69], SSLHostConfig.CertificateVerification.OPTIONAL);
                        break block21;
                    }
                    catch (ListenerException v3) {
                        throw HttpTransportModule.a(v3);
                    }
                }
                try {
                    if (var4_5 != 0) ** GOTO lbl65
                    var2_2.put(HttpTransportModule.T[69], SSLHostConfig.CertificateVerification.NONE);
                }
                catch (ListenerException v4) {
                    throw HttpTransportModule.a(v4);
                }
            } else {
                var9_3 = HttpTransportModule.T;
                var2_2.put(var9_3[101], var9_3[25]);
            }
        }
        var4_6 = Arrays.asList(new String[]{SsgConnector.PROP_BIND_ADDRESS, SsgConnector.PROP_PORT_RANGE_START, SsgConnector.PROP_PORT_RANGE_COUNT, SsgConnector.PROP_TLS_CIPHERLIST, SsgConnector.PROP_TLS_PROTOCOLS});
        var5_7 = var1_1.getPropertyNames();
        for (String var7_9 : var5_7) {
            try {
                if (var4_6.contains(var7_9)) {
                    continue;
                }
            }
            catch (ListenerException v5) {
                throw HttpTransportModule.a(v5);
            }
            var8_10 = var1_1.getProperty(var7_9);
            try {
                if (var8_10 == null) continue;
                var2_2.put(var7_9, var8_10);
            }
            catch (ListenerException v6) {
                throw HttpTransportModule.a(v6);
            }
        }
        return var2_2;
    }

    @Override
    protected void removeConnector(Goid goid) {
        String[] stringArray;
        Pair<SsgConnector, Connector> pair = this.L.remove(goid);
        try {
            if (pair == null) {
                return;
            }
        }
        catch (Exception exception) {
            throw HttpTransportModule.a(exception);
        }
        Connector connector = (Connector)pair.right;
        this.auditStop(((SsgConnector)pair.left).getScheme(), this.describe((SsgConnector)pair.left));
        this.P.getService().removeConnector(connector);
        try {
            connector.destroy();
        }
        catch (Exception exception) {
            stringArray = T;
            this.auditError(((SsgConnector)pair.left).getScheme(), stringArray[13] + ((SsgConnector)pair.left).getPort() + stringArray[116] + ExceptionUtils.getMessage((Throwable)exception), exception);
        }
        org.apache.catalina.Executor executor = this.P.getService().getExecutor(this.b((SsgConnector)pair.left));
        if (executor != null) {
            this.P.getService().removeExecutor(executor);
            try {
                executor.stop();
            }
            catch (Exception exception) {
                stringArray = T;
                this.auditError(((SsgConnector)pair.left).getScheme(), stringArray[79] + ((SsgConnector)pair.left).getPort() + stringArray[116] + ExceptionUtils.getMessage((Throwable)exception), exception);
            }
        }
        this.d((SsgConnector)pair.left);
    }

    @Override
    protected Set<String> getSupportedSchemes() {
        return this.F;
    }

    @Override
    public void init() {
        try {
            this.a();
        }
        catch (LifecycleException lifecycleException) {
            throw new RuntimeException(lifecycleException);
        }
    }

    @Override
    protected void doStart() throws LifecycleException {
        try {
            if (this.isStarted()) {
                return;
            }
        }
        catch (LifecycleException lifecycleException) {
            throw HttpTransportModule.a(lifecycleException);
        }
        this.c();
        this.b();
    }

    @Override
    public boolean isStarted() {
        boolean bl2;
        block7: {
            block6: {
                try {
                    try {
                        try {
                            if (this.isStartingByAnotherThread() || this.isStoppingByAnotherThread()) break block6;
                        }
                        catch (RuntimeException runtimeException) {
                            throw HttpTransportModule.a(runtimeException);
                        }
                        if (!super.isStarted()) break block6;
                    }
                    catch (RuntimeException runtimeException) {
                        throw HttpTransportModule.a(runtimeException);
                    }
                    bl2 = true;
                    break block7;
                }
                catch (RuntimeException runtimeException) {
                    throw HttpTransportModule.a(runtimeException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    @Override
    public void onApplicationEvent(ApplicationEvent applicationEvent) {
        block17: {
            try {
                if (TransportModule.isEventIgnorable(applicationEvent)) {
                    return;
                }
            }
            catch (ListenerException listenerException) {
                throw HttpTransportModule.a(listenerException);
            }
            try {
                super.onApplicationEvent(applicationEvent);
                if (!this.isStarted()) {
                    return;
                }
            }
            catch (ListenerException listenerException) {
                throw HttpTransportModule.a(listenerException);
            }
            try {
                if (!(applicationEvent instanceof ReadyForMessages)) break block17;
                try {
                    this.a(true);
                }
                catch (ListenerException listenerException) {
                    String[] stringArray = T;
                    l.log(Level.SEVERE, stringArray[109], listenerException);
                }
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
            SsgWebSocketManager.postInitInstance(this.getApplicationContext());
            return;
        }
        try {
            if (applicationEvent instanceof BundleBootstrapCompleteEvent) {
                try {
                    this.a(false);
                    return;
                }
                catch (ListenerException listenerException) {
                    String[] stringArray = T;
                    l.log(Level.SEVERE, stringArray[26], listenerException);
                    return;
                }
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        if (!(applicationEvent instanceof EntityInvalidationEvent)) return;
        EntityInvalidationEvent entityInvalidationEvent = (EntityInvalidationEvent)applicationEvent;
        try {
            if (!entityInvalidationEvent.getEntityClass().isAssignableFrom(KeystoreFile.class)) return;
            this.a(T[130]);
            return;
        }
        catch (ListenerException listenerException) {
            throw HttpTransportModule.a(listenerException);
        }
    }

    @Override
    public ApplicationContext getApplicationContext() {
        return super.getApplicationContext();
    }

    private void a(SsgConnector ssgConnector, int n2, Map<String, Object> map) throws ListenerException {
        Connector connector = new Connector(x);
        SsgAbstractHttp11JsseProtocol ssgAbstractHttp11JsseProtocol = (SsgAbstractHttp11JsseProtocol)connector.getProtocolHandler();
        connector.setPort(n2);
        connector.setEnableLookups(false);
        HttpTransportModule.a(connector, map);
        ssgAbstractHttp11JsseProtocol.setSsgDefinitions(this, ssgConnector, this.J);
        ssgAbstractHttp11JsseProtocol.setExecutor(this.a(this.b(ssgConnector), ssgConnector));
        this.a(ssgConnector, connector);
    }

    private void b(SsgConnector ssgConnector, int n2, Map<String, Object> map) throws ListenerException {
        SsgAbstractHttp11JsseProtocol ssgAbstractHttp11JsseProtocol;
        Connector connector;
        block4: {
            connector = new Connector(x);
            ssgAbstractHttp11JsseProtocol = (SsgAbstractHttp11JsseProtocol)connector.getProtocolHandler();
            connector.setPort(n2);
            String[] stringArray = T;
            connector.setScheme(stringArray[92]);
            connector.setProperty(stringArray[2], stringArray[120]);
            connector.setSecure(true);
            connector.setEnableLookups(false);
            ssgAbstractHttp11JsseProtocol.setSsgDefinitions(this, ssgConnector, this.J);
            Object object = map.get(stringArray[129]);
            try {
                if (object == null || !this.K.looksLikeEncryptedPassword(object.toString())) break block4;
            }
            catch (ParseException parseException) {
                throw HttpTransportModule.a(parseException);
            }
            try {
                char[] cArray = this.K.decryptPassword(object.toString());
                stringArray = T;
                map.put(stringArray[94], new String(cArray));
            }
            catch (ParseException parseException) {
                stringArray = T;
                l.log(Level.WARNING, stringArray[21] + ExceptionUtils.getMessage((Throwable)parseException));
                map.remove(stringArray[94]);
            }
        }
        HttpTransportModule.a(connector, map);
        ssgAbstractHttp11JsseProtocol.setExecutor(this.a(this.b(ssgConnector), ssgConnector));
        this.a(ssgConnector, connector);
    }

    private String b(SsgConnector ssgConnector) {
        StringBuilder stringBuilder = new StringBuilder();
        String[] stringArray = T;
        stringBuilder.append(stringArray[4]);
        for (char c10 : ssgConnector.getName().toLowerCase().toCharArray()) {
            try {
                block9: {
                    try {
                        try {
                            try {
                                if (c10 >= '0' && c10 <= '9') break block9;
                            }
                            catch (RuntimeException runtimeException) {
                                throw HttpTransportModule.a(runtimeException);
                            }
                            if (c10 < 'a') continue;
                        }
                        catch (RuntimeException runtimeException) {
                            throw HttpTransportModule.a(runtimeException);
                        }
                        if (c10 > 'z') continue;
                    }
                    catch (RuntimeException runtimeException) {
                        throw HttpTransportModule.a(runtimeException);
                    }
                }
                stringBuilder.append(c10);
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
        }
        stringBuilder.append("-");
        stringBuilder.append(ssgConnector.getGoid());
        stringBuilder.append(T[0]);
        return stringBuilder.toString();
    }

    private Executor a(String string, SsgConnector ssgConnector) throws ListenerException {
        StandardThreadExecutor standardThreadExecutor = this.Q;
        String string2 = ssgConnector.getProperty(SsgConnector.PROP_THREAD_POOL_SIZE);
        if (string2 != null) {
            try {
                int n2 = Integer.parseInt(string2);
                standardThreadExecutor = this.a(string, n2, n2);
                standardThreadExecutor.start();
                this.P.getService().addExecutor((org.apache.catalina.Executor)standardThreadExecutor);
            }
            catch (NumberFormatException numberFormatException) {
                String[] stringArray = T;
                l.warning(stringArray[30] + string2 + stringArray[135] + ssgConnector.getName() + stringArray[46]);
            }
            catch (org.apache.catalina.LifecycleException lifecycleException) {
                String[] stringArray = T;
                throw new ListenerException(stringArray[19] + ssgConnector.getPort() + stringArray[108] + ExceptionUtils.getMessage((Throwable)lifecycleException) + stringArray[95]);
            }
        }
        return standardThreadExecutor;
    }

    private void c() {
        String[] stringArray = T;
        TransportDescriptor transportDescriptor = new TransportDescriptor(stringArray[98], false);
        transportDescriptor.setHttpBased(true);
        transportDescriptor.setSupportsHardwiredServiceResolution(true);
        transportDescriptor.setSupportsSpecifiedContentType(true);
        transportDescriptor.setSupportedEndpoints(EnumSet.of(SsgConnector.Endpoint.MESSAGE_INPUT, new SsgConnector.Endpoint[]{SsgConnector.Endpoint.POLICYDISCO, SsgConnector.Endpoint.PING, SsgConnector.Endpoint.STS, SsgConnector.Endpoint.WSDLPROXY, SsgConnector.Endpoint.SNMPQUERY, SsgConnector.Endpoint.NODE_COMMUNICATION}));
        transportDescriptor.setCustomPropertiesPanelClassname(stringArray[74]);
        this.ssgConnectorManager.registerTransportProtocol(transportDescriptor, this);
        TransportDescriptor transportDescriptor2 = new TransportDescriptor(stringArray[87], true);
        transportDescriptor2.setHttpBased(true);
        transportDescriptor2.setSupportsHardwiredServiceResolution(true);
        transportDescriptor2.setSupportsSpecifiedContentType(true);
        transportDescriptor2.setSupportedEndpoints(EnumSet.allOf(SsgConnector.Endpoint.class));
        transportDescriptor2.setCustomPropertiesPanelClassname(stringArray[110]);
        this.ssgConnectorManager.registerTransportProtocol(transportDescriptor2, this);
    }

    private void d() {
        this.ssgConnectorManager.unregisterTransportProtocol(SsgConnector.SCHEME_HTTP);
        this.ssgConnectorManager.unregisterTransportProtocol(SsgConnector.SCHEME_HTTPS);
    }

    private void a(SsgConnector ssgConnector, Connector connector) throws ListenerException {
        block10: {
            block9: {
                AtomicInteger atomicInteger;
                try {
                    if (this.L.putIfAbsent(ssgConnector.getGoid(), (Pair<SsgConnector, Connector>)new Pair((Object)ssgConnector, (Object)connector)) != null) {
                        return;
                    }
                }
                catch (org.apache.catalina.LifecycleException lifecycleException) {
                    throw HttpTransportModule.a((Exception)((Object)lifecycleException));
                }
                int n2 = ssgConnector.getIntProperty(SsgConnector.PROP_THREAD_POOL_SIZE, 0);
                try {
                    atomicInteger = n2 == 0 ? this.I : new AtomicInteger();
                }
                catch (org.apache.catalina.LifecycleException lifecycleException) {
                    throw HttpTransportModule.a((Exception)((Object)lifecycleException));
                }
                AtomicInteger atomicInteger2 = atomicInteger;
                this.M.put(ssgConnector.getGoid(), atomicInteger2);
                int n3 = ssgConnector.getIntProperty(SsgConnector.PROP_CONCURRENCY_WARNING_THRESHOLD, 0);
                try {
                    if (n3 <= 0) break block9;
                    this.N.put(ssgConnector.getGoid(), n3);
                    break block10;
                }
                catch (org.apache.catalina.LifecycleException lifecycleException) {
                    throw HttpTransportModule.a((Exception)((Object)lifecycleException));
                }
            }
            this.N.remove(ssgConnector.getGoid());
        }
        this.P.getService().addConnector(connector);
        try {
            this.auditStart(ssgConnector.getScheme(), this.describe(ssgConnector));
            connector.start();
        }
        catch (org.apache.catalina.LifecycleException lifecycleException) {
            this.P.getService().removeConnector(connector);
            String[] stringArray = T;
            String string = stringArray[44] + this.describe(ssgConnector) + stringArray[75] + ExceptionUtils.getMessage((Throwable)lifecycleException);
            this.auditError(ssgConnector.getScheme(), string, ExceptionUtils.getDebugException((Throwable)lifecycleException));
            throw new ListenerException(string, lifecycleException);
        }
    }

    static void a(Connector connector, Map<String, Object> map) {
        try {
            if (HttpTransportModule.a(T[88], map, "")) {
                map.put(T[83], HttpTransportModule.e());
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        for (Map.Entry<String, Object> entry : map.entrySet()) {
            try {
                if (T[114].equalsIgnoreCase(entry.getKey())) {
                    connector.setEnableLookups(Boolean.valueOf(String.valueOf(entry.getValue())).booleanValue());
                    continue;
                }
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
            try {
                if (T[11].equalsIgnoreCase(entry.getKey())) {
                    HttpTransportModule.a(entry.getValue(), new h(connector));
                    continue;
                }
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
            try {
                if (T[34].equalsIgnoreCase(entry.getKey())) {
                    HttpTransportModule.a(entry.getValue(), new i(connector));
                    continue;
                }
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
            connector.setProperty(entry.getKey(), String.valueOf(entry.getValue()));
        }
    }

    private static boolean a(String string, Map<String, Object> map, Object object) {
        Object object2 = map.get(string);
        try {
            if (object2 == null) {
                return true;
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        if (object2 instanceof String) {
            object2 = ((String)object2).trim();
        }
        return object2.equals(object);
    }

    private static String e() {
        String string;
        block2: {
            String[] stringArray = T;
            string = ConfigFactory.getProperty((String)stringArray[121]);
            try {
                if (string != null && !string.isBlank()) break block2;
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
            string = T[82];
        }
        return string;
    }

    private static void a(Object object, Functions.UnaryVoid<Integer> unaryVoid) {
        String string = String.valueOf(object).trim();
        try {
            if (ValidationUtils.isValidInteger((String)string, (boolean)false, (int)Integer.MIN_VALUE, (int)Integer.MAX_VALUE)) {
                unaryVoid.call((Object)Integer.parseInt(string));
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
    }

    public long getInstanceId() {
        return this.E;
    }

    public static SsgConnector getConnector(ServletRequest servletRequest) {
        try {
            if (A) {
                return C;
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        String[] stringArray = T;
        Goid goid = (Goid)servletRequest.getAttribute(stringArray[71]);
        try {
            if (goid == null) {
                l.log(Level.WARNING, String.format(stringArray[126], stringArray[118]));
                return null;
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        stringArray = T;
        Long l2 = (Long)servletRequest.getAttribute(stringArray[67]);
        HttpTransportModule httpTransportModule = HttpTransportModule.getInstance(l2);
        try {
            if (httpTransportModule == null) {
                l.log(Level.WARNING, String.format(stringArray[42], stringArray[136]));
                return null;
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        Pair<SsgConnector, Connector> pair = httpTransportModule.L.get(goid);
        try {
            if (pair == null) {
                l.log(Level.WARNING, String.format(T[42], T[18] + String.valueOf(goid)));
                return null;
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        return (SsgConnector)pair.left;
    }

    public static void requireEndpoint(ServletRequest servletRequest, SsgConnector.Endpoint endpoint) throws ListenerException {
        HttpTransportModule.requireEndpoint(HttpTransportModule.getConnector(servletRequest), endpoint);
    }

    public static void requireEndpoint(SsgConnector ssgConnector, SsgConnector.Endpoint endpoint) throws ListenerException {
        try {
            if (ssgConnector == null) {
                throw new ListenerException(T[45]);
            }
        }
        catch (ListenerException listenerException) {
            throw HttpTransportModule.a(listenerException);
        }
        try {
            if (!ssgConnector.offersEndpoint(endpoint)) {
                throw new ListenerException(T[134]);
            }
        }
        catch (ListenerException listenerException) {
            throw HttpTransportModule.a(listenerException);
        }
    }

    public static String getConfiguredHstsHeader(@Nullable SsgConnector ssgConnector, Config config) {
        if (ssgConnector != null) {
            String string;
            block4: {
                String[] stringArray;
                block3: {
                    stringArray = T;
                    String string2 = ssgConnector.getProperty(stringArray[139]);
                    try {
                        if (string2 == null) break block3;
                        string = string2;
                        break block4;
                    }
                    catch (RuntimeException runtimeException) {
                        throw HttpTransportModule.a(runtimeException);
                    }
                }
                stringArray = T;
                string = config.getProperty(stringArray[66]);
            }
            return string;
        }
        return config.getProperty(T[140]);
    }

    public static boolean addHstsHeaderIfRequired(HttpServletResponse httpServletResponse, @Nullable SsgConnector ssgConnector, Config config) {
        block6: {
            try {
                if (ssgConnector != null && !ssgConnector.isSecure()) break block6;
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
            String string = HttpTransportModule.getConfiguredHstsHeader(ssgConnector, config);
            try {
                try {
                    if (string == null || httpServletResponse.containsHeader(HttpConstants.HSTS_HEADER)) break block6;
                }
                catch (RuntimeException runtimeException) {
                    throw HttpTransportModule.a(runtimeException);
                }
                httpServletResponse.addHeader(HttpConstants.HSTS_HEADER, string);
                return true;
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
        }
        return false;
    }

    public static boolean addHstsResponseHeaderIfRequired(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, @Nullable SsgConnector ssgConnector, Config config) {
        try {
            if (httpServletRequest.isSecure()) {
                return HttpTransportModule.addHstsHeaderIfRequired(httpServletResponse, ssgConnector, config);
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        return false;
    }

    public SsgConnector getActiveSsgConnectorByGoid(Goid goid) throws ListenerException {
        Pair<SsgConnector, Connector> pair = this.L.get(goid);
        try {
            if (pair == null) {
                throw new ListenerException(T[90] + String.valueOf(goid));
            }
        }
        catch (ListenerException listenerException) {
            throw HttpTransportModule.a(listenerException);
        }
        return (SsgConnector)pair.left;
    }

    public Connector getActiveConnectorByGoid(Goid goid) throws ListenerException {
        Pair<SsgConnector, Connector> pair = this.L.get(goid);
        try {
            if (pair == null) {
                throw new ListenerException(T[22] + String.valueOf(goid));
            }
        }
        catch (ListenerException listenerException) {
            throw HttpTransportModule.a(listenerException);
        }
        return (Connector)pair.right;
    }

    public static HttpTransportModule getInstance(long l2) {
        HttpTransportModule httpTransportModule;
        try {
            if (A) {
                return D;
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        Reference<HttpTransportModule> reference = z.get(l2);
        try {
            httpTransportModule = reference == null ? null : reference.get();
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        return httpTransportModule;
    }

    private void c(SsgConnector ssgConnector) {
        this.getApplicationContext().publishEvent((ApplicationEvent)new SsgConnectorActivationEvent(this, ssgConnector));
    }

    private void d(SsgConnector ssgConnector) {
        this.getApplicationContext().publishEvent((ApplicationEvent)new SsgConnectorDeactivationEvent(this, ssgConnector));
    }

    @Override
    public Config getServerConfig() {
        return this.J;
    }

    @Override
    public void reportMisconfiguredConnector(Goid goid) {
        String string;
        String[] stringArray;
        String string2;
        block5: {
            Pair<SsgConnector, Connector> pair;
            block6: {
                block4: {
                    pair = this.L.get(goid);
                    try {
                        if (pair != null) break block4;
                        string2 = null;
                        break block5;
                    }
                    catch (RuntimeException runtimeException) {
                        throw HttpTransportModule.a(runtimeException);
                    }
                }
                try {
                    if (pair.left != null) break block6;
                    string2 = null;
                    break block5;
                }
                catch (RuntimeException runtimeException) {
                    throw HttpTransportModule.a(runtimeException);
                }
            }
            stringArray = T;
            string2 = stringArray[58] + ((SsgConnector)pair.left).getPort() + ")";
        }
        String string3 = string = string2;
        String string4 = String.valueOf(goid);
        stringArray = T;
        l.log(Level.WARNING, stringArray[62] + string4 + string3 + stringArray[93]);
        this.removeConnector(goid);
    }

    public int incrementConcurrencyForConnector(Goid goid) {
        int n2;
        block5: {
            AtomicInteger atomicInteger = this.M.get(goid);
            if (null == atomicInteger) {
                atomicInteger = this.I;
            }
            n2 = atomicInteger.incrementAndGet();
            Integer n3 = this.N.get(goid);
            try {
                try {
                    if (n3 == null || n2 < n3) break block5;
                }
                catch (RuntimeException runtimeException) {
                    throw HttpTransportModule.a(runtimeException);
                }
                this.a(goid, n2);
            }
            catch (RuntimeException runtimeException) {
                throw HttpTransportModule.a(runtimeException);
            }
        }
        return n2;
    }

    private void a(Goid goid, int n2) {
        String[] stringArray = T;
        int n3 = ConfigFactory.getIntProperty((String)stringArray[132], (int)60);
        long l2 = System.currentTimeMillis();
        long l3 = this.O.get();
        long l4 = l2 - l3;
        try {
            if (l4 < 1000L * (long)n3) {
                l.finer(stringArray[63]);
                return;
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        if (l3 == this.O.getAndSet(l2)) {
            stringArray = T;
            TransportEvent transportEvent = new TransportEvent(this, this.component, null, Level.INFO, stringArray[113], stringArray[65] + n2);
            this.auditTransportEvent(transportEvent, (AuditDetailMessage)SystemMessages.CONNECTOR_CONCURRENCY_WARNING, new String[]{goid.toString(), String.valueOf(n2)}, null);
        }
    }

    public int decrementConcurrencyForConnector(Goid goid) {
        AtomicInteger atomicInteger = this.M.get(goid);
        if (null == atomicInteger) {
            atomicInteger = this.I;
        }
        return atomicInteger.decrementAndGet();
    }

    @Override
    protected void onDefaultSslKeyReload() {
        this.a(T[97]);
    }

    private void a(String string) {
        try {
            if (!this.isStarted()) {
                return;
            }
        }
        catch (RuntimeException runtimeException) {
            throw HttpTransportModule.a(runtimeException);
        }
        this.L.forEach((goid, pair) -> {
            String[] stringArray = T;
            if (((SsgConnector)pair.left).getBooleanProperty(stringArray[55])) {
                l.log(Level.WARNING, stringArray[106], new Object[]{((SsgConnector)pair.left).getName(), string});
                SsgAbstractHttp11JsseProtocol ssgAbstractHttp11JsseProtocol = (SsgAbstractHttp11JsseProtocol)((Connector)pair.right).getProtocolHandler();
                ssgAbstractHttp11JsseProtocol.reloadSslHostConfigs();
            }
        });
    }

    @Override
    public SsgKeyEntry getKeyEntry(SsgConnector ssgConnector) throws ListenerException {
        try {
            SsgKeyEntry ssgKeyEntry;
            DefaultKey defaultKey = this.getDefaultKey();
            try {
                ssgKeyEntry = ssgConnector.getKeystoreGoid() == null ? defaultKey.getLatestServerSslInfo() : defaultKey.lookupKeyByKeyAlias(ssgConnector.getKeyAlias(), ssgConnector.getKeystoreGoid());
            }
            catch (IOException iOException) {
                throw HttpTransportModule.a(iOException);
            }
            return ssgKeyEntry;
        }
        catch (IOException iOException) {
            String[] stringArray = T;
            throw new ListenerException(stringArray[89] + ExceptionUtils.getMessage((Throwable)iOException), iOException);
        }
        catch (FindException | KeyStoreException throwable) {
            throw new ListenerException(T[102] + ExceptionUtils.getMessage((Throwable)throwable), throwable);
        }
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[144];
                var3_1 = 0;
                var2_2 = "Sa\u00155L0A\u0011v\u001d\u0016p\u0019 {7T\u0010w\u001d?]1x\u0011`\u0018<J\f[\rp\f>L |\u001a\n-W!\u0015A$W\u0012a\t\u0015\u0017kC8[1E?h\u0001?X\u0007T\u001do\u001e<N6]\n\u001dk\u0003>J&A\u0011v@#+j\f2C \u0015\nkM6F+Q^m\u00039[,T\u0012$\u000e?A+P\u001dp\u0002\"\\\u007f\u0015\u001d\u0016p\u0019 {7T\u0010w\u001d?]1x\u0011`\u0018<J\f[\rp\f>L |\u001a-\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~[*X\u001de\u0019~|6R-W!\u0019B5Y\u001bi\b>[$A\u0017k\u0003;\u0011v\n~N5T\u001dl\b~L$A\u001fh\u0004>NkV\u0011j\u00035L1Z\f*.?V*A\u001bE\t1_1P\f*,\u001cc\nb!F,\u0013d\u0016y?W%\t\u0017i\f7JjR\u0017b\u000b\u001fg\u000e5_1v\u0011q\u0003$\u0011\u0013e\u0015\u0000N7T\u0013a\u00195]\u0006Z\u000bj\u0019\u0003\u0016p\u0000.;|\u000e5_1\\\u0011jM'G,Y\u001b$\t5\\1G\u0011}\u0004>HeV\u0011j\u00035L1Z\f$\u000b?]eE\u0011v\u0019p\b\u000bw\b\"\u0001!\\\f)+j\f2C \u0015\nkM#N3P^v\b!Z,G\u001b`M3@+[\u001bg\u0019?]eA\u0011$)\u0012\u0015e\u00076P9\u0000\u0007\u0016\u001c\n\u0017i\f7Jj_\u000ea\n@\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~\\6R=k\u0003>J&A\u0011v\"9K\u007f\u00150kM1L1\\\baM3@+[\u001bg\u0019?]eB\u0017p\u0005p@,Q^'+j\f2C \u0015\nkM#[$G\n$%\u0004{\u0015f^h\u0004#[ [\u001bvM?AeE\u0011v\u0019p\u0018\u0017k%$[5e\u0011k\u0001\u001dN=v\u0011j\u000e%]7P\u0010g\u0014i+j\f2C \u0015\nkM4J&G\u0007t\u0019pJ+V\f}\u001d$J!\u0015\u000ee\u001e#X*G\u001a$\u0004>\u000f6P\fr\b\"\u0001=X\u0012$@}\u000f#T\u0012h\u0004>HeW\u001fg\u0006p[*\u0015\u000ee\u001e#X*G\u001a$\u000b\"@(\u0015\u0015a\u0014#[*G\u001b*\u001d\"@5P\fp\u00045\\\u007f\u0015$0kM1L1\\\baM3@+[\u001bg\u0019?]eP\u0006m\u001e$\\eB\u0017p\u0005p@,Q^\u0003\rw\n\t\na\u0015$\u0000-A\u0013h\u0005L4]`\u001f\u001f+j\f2C \u0015\nkM#[$G\n$%\u0004{\u0015\u0015\u001dk\u0003>J&A\u0011v\u001e\u0018\u0017k%$[5e\u0011k\u0001\u001dN=v\u0011j\u000e%]7P\u0010g\u0014\u0003\u000ej\n\u0003O1]#7c\u0003?],[\u0019$\u0004>Y$Y\u0017`M$G7P\u001f`M @*Y^w\u0004*Je\u0012(\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~] F\u000ek\u0003#Jk]\u001be\t5]kF\u001bv\u001b5]\u0011-W!\u0019B5Y\u001bi\b>[$A\u0017k\u0003\u0014\u001am\u001e1M)P+t\u0001?N!a\u0017i\b?Z1\u000b\u0013e\u0015\u0000@6A-m\u00175\u0019\u0017k%$[5e\u0011k\u0001\u001dF+f\u000ee\u001f5{-G\u001be\t#\u0006\rg\u00055B \u0004\u0014t\b7\u0006\ra\u000e%] \u0004\tk\u001f;\u00076P9\u0000\u0007\u0016\u001c\u0003\u001dw\u001e ,a\u001c%J6A^h\f3D6\u0015\be\u00019KeT\np\u001f9M0A\u001b$H#\u0003\u0006i\u0001\u0010+j\f2C \u0015\nkM#[$G\n$10kM3@+[\u001bg\u0019?]eB\u001fwM6@0[\u001a$\u000b?]eA\u0016aM#_ V\u0017b\u00045KeG\u001bu\u00185\\1\u001b\u0002Y*\u00156P9\u0000\u000f\u0011G\u001fj\u001e @7A^I\u00024Z)PB6p\u0019 {7T\u0010w\u001d?]1x\u0011`\u0018<Je\\\r$\u00047A*G\u0017j\npA*[SL9\u0004\u007fmfW$\u000e?A+P\u001dp\u0002\"\u000f2\\\nlM#L-P\u0013aM++j\f2C \u0015\nkM#[$G\n$H#\u000f&Z\u0010j\b3[*G^k\u0003p_*G\n$H#\u0015e\u0010\r\u0015\u001f`\u00009A\u0016@\u001cw\u0014#[ X.v\b#J+A(=l\f>H,[\u0019$%\u0004{\u0015\u001a6P9\u0000|eV\u0011j\u000e%]7P\u0010g\u0014p[*\u0015\u001dk\u001f5\u0012\u0007\u001f`\t\"J6F\u0005;v\u001f?]\u000f\rw\n\u0013@+[\u001bg\u0019?]\n\\\u001a\u0013\fa\u000b\"J6]1j&5V\u0006]\u001fj\n5\\\u00140kM'J'\u0015\u001am\u001f5L1Z\f}M#J1\n\u0013e\u0015\u0004G7P\u001f`\u001e\u0007^,\u001d?]1\u0015\b\u001b|\b3Z1Z\f\u0002L1\n\u0017i\f7Jj_\u000ea\n!-l\u0018$[,[\u0019$\t?X+\u00156P9\u0000\u000f&Z\u0010j\b3[*G^K$\u0014\u000f8-q\u001d ] F\rm\u00037\u000f7P\u000ea\f$J!\u0015\u001dk\u0003>J&A\u0011vM3@+V\u000bv\u001f5A&L^s\f\"A,[\u0019$\f%K,A\u000f\u0013m\u0003\u0003_$G\u001bP\u0005\"J$Q\r\u001f2m\u001e$J+P\f$\u000e?A&@\fv\b>L<\u0015\u001b|\u000e5J!P\u001a>M\u001d\u0017k%$[5f\nv\u00043[\u0011G\u001fj\u001e @7A-a\u000e%],A\u0007/\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~G1A\u000eP\u001f1A6E\u0011v\u0019\u001d@!@\u0012a$>\\1T\u0010g\b\u0019K\u0007\u001aa\u000b1Z)A\n\u001dh\u00045A1t\u000bp\u0005\u0004\u0016p\u0000<!\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~\\6R=k\u0003>J&A\u0011v\"9K\u0018\u0014e\u001b1\u0001+P\n*/9A!p\u0006g\b [,Z\u0010>M\u0003\n|\u00199\u001dk\u0000~CrA\u001bg\u0005~L*[\rk\u00015\u00015T\u0010a\u0001#\u0001\rA\nt9\"N+F\u000ek\u001f$`1]\u001bv>5[1\\\u0010c\u001e\u0000N+P\u0012\u0002D$\u0007\u001aa\u000b1Z)A\t\na\u0015$\u0000-A\u0013h\u0004\nv\u001850;|\u000e5_1\\\u0011jM'G,Y\u001b$\t5\\1G\u0011}\u0004>HeA\u0016v\b1KeE\u0011k\u0001pI*G^t\u0002\"[e\u0018\ra\u001f&F&PDL\u0019$_\bP\rw\f7J\f[\u000eq\u0019\u001a;v\u001f?]eB\u0016m\u00015\u000f6]\u000bp\u00199A\"\u0015\u001ak\u001a>\u0001\u00122e\u00145]r\u0018?T$}h$A\u001bs\f)\u0006\ra\u001f&J7\u000f\rw\n\u0013@+[\u001bg\u0019?]\n\\\u001a\u00122e\u00145]r\u0018?T$}h$A\u001bs\f)\u0003\rw\n\u00056P9\u0000|\u0006\ra\u001f&J720kM4J#T\u000bh\u0019p| G\ba\u001fp|\u0016y^o\b)\u000f,F^g\u0018\"] [\nh\u0014pN3T\u0017h\f2C \u000f^$0kM1L1\\\baM3@+[\u001bg\u0019?]eP\u0006m\u001e$\\eB\u0017p\u0005p@,Q^\u001d=k\u0003>J&A\u0011vM=Z6A^f\bp_ G\rm\u001e$J+AP\u0005\u0016p\u0019 \\;^f\b3N0F\u001b$\u0004$\u000f&T\u0010j\u0002$\u000f'P^k\u001d5A Q^s\u0004$Ge\\\nwM3Z7G\u001bj\u0019pL*[\u0018m\n%]$A\u0017k\u0003\f\u0015a\u0014#[*G\u001bT\f#\\\u0002Y*\u0015\u0017k%$[5e\u0011k\u0001\u001dN=|\u001ah\b\u0004F(P$\fa\u0001?N!\\\u0010cM$G \u0015\u001aa\u000b1Z)A^w\b\"Y G^W>\u001c\u000f.P\u0007\u00046P9\u0000\f\nk\u00003N1\u0018\u001b|\b3\u00023+j\f2C \u0015\nkM\"J6A\u001fv\u0019pJ=P\u001dq\u0019?]eT\u0018p\b\"\u000f&]\u001fj\n9A\"\u0015\u000ev\u0002 J7A\u0007$\u0011\u001dk\u0003>J&A\u0017k\u0003\u0004F(P\u0011q\u0019,+j\f2C \u0015\nkM1L&P\rwM ],C\u001fp\bpD L^b\u0002\"\u000f&Z\u0010j\b3[*GD$)+j\f2C \u0015\nkM#N3P^b\f<C'T\u001doM3@+[\u001bg\u0019?]eA\u0011$)\u0012\u0015e\u0007\u001f`\t\"J6F%\u0017kC8[1E=k\u00033Z7G\u001bj\u000e)x$G\u0010m\u00037\u00017P\u000ea\f$k Y\u001f}:,a\u000b\"J6]\u0017j\np|\u0016y^g\u0002>I,R\u000bv\f$F*[^b\u0002\"\u000f&Z\u0010j\b3[*G^\u007f]-\u0003eQ\u000baM$@eNOy;\u0011v\n~N5T\u001dl\b~L$A\u001fh\u0004>NkV\u0011j\u00035L1Z\f*.?V*A\u001bE\t1_1P\f*,\u001cc\nb!F,\u0013d\u0016y?W%\u001fD$8>N'Y\u001b$\u0019?\u000f6A\u001fv\u0019p[-G\u001be\tp_*Z\u0012$J\u001f+j\f2C \u0015\nkM#[$G\n$%\u0004{\u0015\u0015\u001dk\u0003>J&A\u0011v\u001e9\u001dk\u0000~CrA\u001bg\u0005~L*[\rk\u00015\u00015T\u0010a\u0001#\u0001\rA\nt9\"N+F\u000ek\u001f$`1]\u001bv>5[1\\\u0010c\u001e\u0000N+P\u0012\f\ta\u000f\u0014F7P\u001dp\u0002\"V\u0003\u0019m\u000b\u0014=k\u00033Z7G\u001bj\u000e)\u000f\u0000M\u001da\b4J!\r\u001bj\f2C y\u0011k\u0006%_6\n\u001dh\u00045A1t\u000bp\u0005\u0002D$\u0006R$\u00001Wx!\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~\\6R=k\u0003>J&A\u0011v\"9K++j\f2C \u0015\nkM#[$G\n$H#\u000f&Z\u0010j\b3[*G^k\u0003p_*G\n$H#\u0015e\u0010\r\u0004\nv\u00185(\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~] F\u000ek\u0003#Jk]\u001be\t5]kF\u001bv\u001b5]\u0003O4]\u00130kM#Z&]^`\u0004\"J&A\u0011v\u0014j\u000f\u0019\u0017k%$[5e\u0011k\u0001\u001dF+f\u000ee\u001f5{-G\u001be\t#)+j\f2C \u0015\nkM#[$G\n$%\u0004{\u0015\u0015\u0012m\u001e$J+P\f$\u001e%M6L\rp\b=\u0015e ,a\u001c%J6A^h\f3D6\u0015\be\u00019KeT\np\u001f9M0A\u001b$H#\u0003\u0014t\n\u001b\u0016p\u0019 |1G\u0017g\u0019\u0004]$[\rt\u0002\"[\u0016P\u001dq\u001f9[<\f\u0015a\u0014#[*G\u001bT\f#\\\u00185a\u0014#[*G\u001b$\u000b9C \u0015\u0017wM%_!T\na\t\b\na\u0015$\u0000&F\r%\u0017kC8[1E=k\u00033Z7G\u001bj\u000e)x$G\u0010m\u00037\u00017P\u000ea\f$k Y\u001f}\t\u0017i\f7JjE\u0010c-*l\u0004#\u000f7P\u000fq\b#[eV\u001fj\u0003?[eW\u001b$\f3L E\na\tp@+\u0015\nl\u0004#\u000f5Z\fpC\u0011Y$\u000b?]eV\u0011j\u00035L1Z\f$J/\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~G1A\u000eP\u001f1A6E\u0011v\u0019\u001d@!@\u0012a$>\\1T\u0010g\b\u0019K\b\na\u0015$\u0000=X\u0012\u000f\u0016p\u0019 | F\rm\u0002>a$X\u001b\u001b\u0016p\u0019 |1G\u0017g\u0019\u0004]$[\rt\u0002\"[\u0016P\u001dq\u001f9[<\u001d\u0017k%$[5f\nv\u00043[\u0011G\u001fj\u001e @7A-a\u000e%],A\u0007\f\be\u001f\u0014F7P\u001dp\u0002\"V";
                var4_3 = "Sa\u00155L0A\u0011v\u001d\u0016p\u0019 {7T\u0010w\u001d?]1x\u0011`\u0018<J\f[\rp\f>L |\u001a\n-W!\u0015A$W\u0012a\t\u0015\u0017kC8[1E?h\u0001?X\u0007T\u001do\u001e<N6]\n\u001dk\u0003>J&A\u0011v@#+j\f2C \u0015\nkM6F+Q^m\u00039[,T\u0012$\u000e?A+P\u001dp\u0002\"\\\u007f\u0015\u001d\u0016p\u0019 {7T\u0010w\u001d?]1x\u0011`\u0018<J\f[\rp\f>L |\u001a-\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~[*X\u001de\u0019~|6R-W!\u0019B5Y\u001bi\b>[$A\u0017k\u0003;\u0011v\n~N5T\u001dl\b~L$A\u001fh\u0004>NkV\u0011j\u00035L1Z\f*.?V*A\u001bE\t1_1P\f*,\u001cc\nb!F,\u0013d\u0016y?W%\t\u0017i\f7JjR\u0017b\u000b\u001fg\u000e5_1v\u0011q\u0003$\u0011\u0013e\u0015\u0000N7T\u0013a\u00195]\u0006Z\u000bj\u0019\u0003\u0016p\u0000.;|\u000e5_1\\\u0011jM'G,Y\u001b$\t5\\1G\u0011}\u0004>HeV\u0011j\u00035L1Z\f$\u000b?]eE\u0011v\u0019p\b\u000bw\b\"\u0001!\\\f)+j\f2C \u0015\nkM#N3P^v\b!Z,G\u001b`M3@+[\u001bg\u0019?]eA\u0011$)\u0012\u0015e\u00076P9\u0000\u0007\u0016\u001c\n\u0017i\f7Jj_\u000ea\n@\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~\\6R=k\u0003>J&A\u0011v\"9K\u007f\u00150kM1L1\\\baM3@+[\u001bg\u0019?]eB\u0017p\u0005p@,Q^'+j\f2C \u0015\nkM#[$G\n$%\u0004{\u0015f^h\u0004#[ [\u001bvM?AeE\u0011v\u0019p\u0018\u0017k%$[5e\u0011k\u0001\u001dN=v\u0011j\u000e%]7P\u0010g\u0014i+j\f2C \u0015\nkM4J&G\u0007t\u0019pJ+V\f}\u001d$J!\u0015\u000ee\u001e#X*G\u001a$\u0004>\u000f6P\fr\b\"\u0001=X\u0012$@}\u000f#T\u0012h\u0004>HeW\u001fg\u0006p[*\u0015\u000ee\u001e#X*G\u001a$\u000b\"@(\u0015\u0015a\u0014#[*G\u001b*\u001d\"@5P\fp\u00045\\\u007f\u0015$0kM1L1\\\baM3@+[\u001bg\u0019?]eP\u0006m\u001e$\\eB\u0017p\u0005p@,Q^\u0003\rw\n\t\na\u0015$\u0000-A\u0013h\u0005L4]`\u001f\u001f+j\f2C \u0015\nkM#[$G\n$%\u0004{\u0015\u0015\u001dk\u0003>J&A\u0011v\u001e\u0018\u0017k%$[5e\u0011k\u0001\u001dN=v\u0011j\u000e%]7P\u0010g\u0014\u0003\u000ej\n\u0003O1]#7c\u0003?],[\u0019$\u0004>Y$Y\u0017`M$G7P\u001f`M @*Y^w\u0004*Je\u0012(\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~] F\u000ek\u0003#Jk]\u001be\t5]kF\u001bv\u001b5]\u0011-W!\u0019B5Y\u001bi\b>[$A\u0017k\u0003\u0014\u001am\u001e1M)P+t\u0001?N!a\u0017i\b?Z1\u000b\u0013e\u0015\u0000@6A-m\u00175\u0019\u0017k%$[5e\u0011k\u0001\u001dF+f\u000ee\u001f5{-G\u001be\t#\u0006\rg\u00055B \u0004\u0014t\b7\u0006\ra\u000e%] \u0004\tk\u001f;\u00076P9\u0000\u0007\u0016\u001c\u0003\u001dw\u001e ,a\u001c%J6A^h\f3D6\u0015\be\u00019KeT\np\u001f9M0A\u001b$H#\u0003\u0006i\u0001\u0010+j\f2C \u0015\nkM#[$G\n$10kM3@+[\u001bg\u0019?]eB\u001fwM6@0[\u001a$\u000b?]eA\u0016aM#_ V\u0017b\u00045KeG\u001bu\u00185\\1\u001b\u0002Y*\u00156P9\u0000\u000f\u0011G\u001fj\u001e @7A^I\u00024Z)PB6p\u0019 {7T\u0010w\u001d?]1x\u0011`\u0018<Je\\\r$\u00047A*G\u0017j\npA*[SL9\u0004\u007fmfW$\u000e?A+P\u001dp\u0002\"\u000f2\\\nlM#L-P\u0013aM++j\f2C \u0015\nkM#[$G\n$H#\u000f&Z\u0010j\b3[*G^k\u0003p_*G\n$H#\u0015e\u0010\r\u0015\u001f`\u00009A\u0016@\u001cw\u0014#[ X.v\b#J+A(=l\f>H,[\u0019$%\u0004{\u0015\u001a6P9\u0000|eV\u0011j\u000e%]7P\u0010g\u0014p[*\u0015\u001dk\u001f5\u0012\u0007\u001f`\t\"J6F\u0005;v\u001f?]\u000f\rw\n\u0013@+[\u001bg\u0019?]\n\\\u001a\u0013\fa\u000b\"J6]1j&5V\u0006]\u001fj\n5\\\u00140kM'J'\u0015\u001am\u001f5L1Z\f}M#J1\n\u0013e\u0015\u0004G7P\u001f`\u001e\u0007^,\u001d?]1\u0015\b\u001b|\b3Z1Z\f\u0002L1\n\u0017i\f7Jj_\u000ea\n!-l\u0018$[,[\u0019$\t?X+\u00156P9\u0000\u000f&Z\u0010j\b3[*G^K$\u0014\u000f8-q\u001d ] F\rm\u00037\u000f7P\u000ea\f$J!\u0015\u001dk\u0003>J&A\u0011vM3@+V\u000bv\u001f5A&L^s\f\"A,[\u0019$\f%K,A\u000f\u0013m\u0003\u0003_$G\u001bP\u0005\"J$Q\r\u001f2m\u001e$J+P\f$\u000e?A&@\fv\b>L<\u0015\u001b|\u000e5J!P\u001a>M\u001d\u0017k%$[5f\nv\u00043[\u0011G\u001fj\u001e @7A-a\u000e%],A\u0007/\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~G1A\u000eP\u001f1A6E\u0011v\u0019\u001d@!@\u0012a$>\\1T\u0010g\b\u0019K\u0007\u001aa\u000b1Z)A\n\u001dh\u00045A1t\u000bp\u0005\u0004\u0016p\u0000<!\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~\\6R=k\u0003>J&A\u0011v\"9K\u0018\u0014e\u001b1\u0001+P\n*/9A!p\u0006g\b [,Z\u0010>M\u0003\n|\u00199\u001dk\u0000~CrA\u001bg\u0005~L*[\rk\u00015\u00015T\u0010a\u0001#\u0001\rA\nt9\"N+F\u000ek\u001f$`1]\u001bv>5[1\\\u0010c\u001e\u0000N+P\u0012\u0002D$\u0007\u001aa\u000b1Z)A\t\na\u0015$\u0000-A\u0013h\u0004\nv\u001850;|\u000e5_1\\\u0011jM'G,Y\u001b$\t5\\1G\u0011}\u0004>HeA\u0016v\b1KeE\u0011k\u0001pI*G^t\u0002\"[e\u0018\ra\u001f&F&PDL\u0019$_\bP\rw\f7J\f[\u000eq\u0019\u001a;v\u001f?]eB\u0016m\u00015\u000f6]\u000bp\u00199A\"\u0015\u001ak\u001a>\u0001\u00122e\u00145]r\u0018?T$}h$A\u001bs\f)\u0006\ra\u001f&J7\u000f\rw\n\u0013@+[\u001bg\u0019?]\n\\\u001a\u00122e\u00145]r\u0018?T$}h$A\u001bs\f)\u0003\rw\n\u00056P9\u0000|\u0006\ra\u001f&J720kM4J#T\u000bh\u0019p| G\ba\u001fp|\u0016y^o\b)\u000f,F^g\u0018\"] [\nh\u0014pN3T\u0017h\f2C \u000f^$0kM1L1\\\baM3@+[\u001bg\u0019?]eP\u0006m\u001e$\\eB\u0017p\u0005p@,Q^\u001d=k\u0003>J&A\u0011vM=Z6A^f\bp_ G\rm\u001e$J+AP\u0005\u0016p\u0019 \\;^f\b3N0F\u001b$\u0004$\u000f&T\u0010j\u0002$\u000f'P^k\u001d5A Q^s\u0004$Ge\\\nwM3Z7G\u001bj\u0019pL*[\u0018m\n%]$A\u0017k\u0003\f\u0015a\u0014#[*G\u001bT\f#\\\u0002Y*\u0015\u0017k%$[5e\u0011k\u0001\u001dN=|\u001ah\b\u0004F(P$\fa\u0001?N!\\\u0010cM$G \u0015\u001aa\u000b1Z)A^w\b\"Y G^W>\u001c\u000f.P\u0007\u00046P9\u0000\f\nk\u00003N1\u0018\u001b|\b3\u00023+j\f2C \u0015\nkM\"J6A\u001fv\u0019pJ=P\u001dq\u0019?]eT\u0018p\b\"\u000f&]\u001fj\n9A\"\u0015\u000ev\u0002 J7A\u0007$\u0011\u001dk\u0003>J&A\u0017k\u0003\u0004F(P\u0011q\u0019,+j\f2C \u0015\nkM1L&P\rwM ],C\u001fp\bpD L^b\u0002\"\u000f&Z\u0010j\b3[*GD$)+j\f2C \u0015\nkM#N3P^b\f<C'T\u001doM3@+[\u001bg\u0019?]eA\u0011$)\u0012\u0015e\u0007\u001f`\t\"J6F%\u0017kC8[1E=k\u00033Z7G\u001bj\u000e)x$G\u0010m\u00037\u00017P\u000ea\f$k Y\u001f}:,a\u000b\"J6]\u0017j\np|\u0016y^g\u0002>I,R\u000bv\f$F*[^b\u0002\"\u000f&Z\u0010j\b3[*G^\u007f]-\u0003eQ\u000baM$@eNOy;\u0011v\n~N5T\u001dl\b~L$A\u001fh\u0004>NkV\u0011j\u00035L1Z\f*.?V*A\u001bE\t1_1P\f*,\u001cc\nb!F,\u0013d\u0016y?W%\u001fD$8>N'Y\u001b$\u0019?\u000f6A\u001fv\u0019p[-G\u001be\tp_*Z\u0012$J\u001f+j\f2C \u0015\nkM#[$G\n$%\u0004{\u0015\u0015\u001dk\u0003>J&A\u0011v\u001e9\u001dk\u0000~CrA\u001bg\u0005~L*[\rk\u00015\u00015T\u0010a\u0001#\u0001\rA\nt9\"N+F\u000ek\u001f$`1]\u001bv>5[1\\\u0010c\u001e\u0000N+P\u0012\f\ta\u000f\u0014F7P\u001dp\u0002\"V\u0003\u0019m\u000b\u0014=k\u00033Z7G\u001bj\u000e)\u000f\u0000M\u001da\b4J!\r\u001bj\f2C y\u0011k\u0006%_6\n\u001dh\u00045A1t\u000bp\u0005\u0002D$\u0006R$\u00001Wx!\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~\\6R=k\u0003>J&A\u0011v\"9K++j\f2C \u0015\nkM#[$G\n$H#\u000f&Z\u0010j\b3[*G^k\u0003p_*G\n$H#\u0015e\u0010\r\u0004\nv\u00185(\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~] F\u000ek\u0003#Jk]\u001be\t5]kF\u001bv\u001b5]\u0003O4]\u00130kM#Z&]^`\u0004\"J&A\u0011v\u0014j\u000f\u0019\u0017k%$[5e\u0011k\u0001\u001dF+f\u000ee\u001f5{-G\u001be\t#)+j\f2C \u0015\nkM#[$G\n$%\u0004{\u0015\u0015\u0012m\u001e$J+P\f$\u001e%M6L\rp\b=\u0015e ,a\u001c%J6A^h\f3D6\u0015\be\u00019KeT\np\u001f9M0A\u001b$H#\u0003\u0014t\n\u001b\u0016p\u0019 |1G\u0017g\u0019\u0004]$[\rt\u0002\"[\u0016P\u001dq\u001f9[<\f\u0015a\u0014#[*G\u001bT\f#\\\u00185a\u0014#[*G\u001b$\u000b9C \u0015\u0017wM%_!T\na\t\b\na\u0015$\u0000&F\r%\u0017kC8[1E=k\u00033Z7G\u001bj\u000e)x$G\u0010m\u00037\u00017P\u000ea\f$k Y\u001f}\t\u0017i\f7JjE\u0010c-*l\u0004#\u000f7P\u000fq\b#[eV\u001fj\u0003?[eW\u001b$\f3L E\na\tp@+\u0015\nl\u0004#\u000f5Z\fpC\u0011Y$\u000b?]eV\u0011j\u00035L1Z\f$J/\u001dk\u0000~CrA\u001bg\u0005~\\ G\ba\u001f~G1A\u000eP\u001f1A6E\u0011v\u0019\u001d@!@\u0012a$>\\1T\u0010g\b\u0019K\b\na\u0015$\u0000=X\u0012\u000f\u0016p\u0019 | F\rm\u0002>a$X\u001b\u001b\u0016p\u0019 |1G\u0017g\u0019\u0004]$[\rt\u0002\"[\u0016P\u001dq\u001f9[<\u001d\u0017k%$[5f\nv\u00043[\u0011G\u001fj\u001e @7A-a\u000e%],A\u0007\f\be\u001f\u0014F7P\u001dp\u0002\"V".length();
                var1_4 = 9;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 78;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = HttpTransportModule.c(v0, HttpTransportModule.d(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u0010{\u000f>\u001a/C\u0005w\u0019\u001a1m\u001e$R\u007fTTcW(T,J\u0000>\u0014%[1J\u0007j\u00188F";
                    var4_3 = "\u0010{\u000f>\u001a/C\u0005w\u0019\u001a1m\u001e$R\u007fTTcW(T,J\u0000>\u0014%[1J\u0007j\u00188F".length();
                    var1_4 = 10;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 84;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = HttpTransportModule.c(v0, HttpTransportModule.d(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        HttpTransportModule.T = var5;
        HttpTransportModule.v = HttpTransportModule.T[140];
        HttpTransportModule.r = HttpTransportModule.T[49];
        HttpTransportModule.t = HttpTransportModule.T[69];
        HttpTransportModule.n = HttpTransportModule.T[31];
        HttpTransportModule.o = HttpTransportModule.T[85];
        HttpTransportModule.B = HttpTransportModule.T[107];
        HttpTransportModule.p = HttpTransportModule.T[94];
        HttpTransportModule.CONNECTOR_ATTR_TRANSPORT_MODULE_ID = HttpTransportModule.T[6];
        HttpTransportModule.CONNECTOR_ATTR_CONNECTOR_OID = HttpTransportModule.T[84];
        HttpTransportModule.HSTS_CONNECTOR_PROPERTY = HttpTransportModule.T[128];
        HttpTransportModule.s = HttpTransportModule.T[42];
        HttpTransportModule.INIT_PARAM_INSTANCE_ID = HttpTransportModule.T[6];
        HttpTransportModule.q = HttpTransportModule.T[105];
        HttpTransportModule.m = HttpTransportModule.T[83];
        HttpTransportModule.u = HttpTransportModule.T[16];
        HttpTransportModule.l = Logger.getLogger(HttpTransportModule.class.getName());
        HttpTransportModule.w = SsgHttpConstants.getHttpConnectorType();
        HttpTransportModule.x = SsgHttpConstants.getHttpProtocolHandlerClassName();
        HttpTransportModule.y = new AtomicLong(1L);
        HttpTransportModule.z = new ConcurrentHashMap<Long, Reference<HttpTransportModule>>();
        HttpTransportModule.A = false;
        HttpTransportModule.C = null;
        HttpTransportModule.D = null;
    }

    private static Exception a(Exception exception) {
        return exception;
    }

    private static char[] d(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x7B);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String c(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 48;
                    case 1 -> 74;
                    case 2 -> 35;
                    case 3 -> 30;
                    case 4 -> 97;
                    case 5 -> 11;
                    default -> 123;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

