package com.l7tech.server.transport.jms2;

import com.l7tech.gateway.common.LicenseManager;
import com.l7tech.gateway.common.transport.jms.JmsConnection;
import com.l7tech.gateway.common.transport.jms.JmsEndpoint;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.JmsEndpointHeader;
import com.l7tech.server.LifecycleBean;
import com.l7tech.server.LifecycleException;
import com.l7tech.server.event.system.ReadyForMessages;
import com.l7tech.server.transport.jms.JmsConnectionManager;
import com.l7tech.server.transport.jms.JmsEndpointManager;
import com.l7tech.server.transport.jms.JmsPropertyMapper;
import com.l7tech.server.util.ThreadPoolBean;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.Timer;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.springframework.context.ApplicationEvent;

public class JmsBootProcess extends LifecycleBean implements PropertyChangeListener {
   private static final Logger h;
   private final ThreadPoolBean i;
   private final JmsConnectionManager j;
   private final JmsEndpointManager k;
   private final JmsPropertyMapper l;
   private final Object m;
   private final JmsEndpointListenerFactory n;
   private Set<JmsEndpointListener> o;
   private final Timer p;
   private boolean q;
   private volatile boolean r;
   private j s;
   private k t;
   private static final String[] u;

   public JmsBootProcess(
      ThreadPoolBean var1,
      LicenseManager var2,
      JmsConnectionManager var3,
      JmsEndpointManager var4,
      JmsPropertyMapper var5,
      JmsEndpointListenerFactory var6,
      Timer var7
   ) {
      String[] var8 = u;
      super(var8[3], h, var8[9], var2);
      this.m = new Object();
      this.o = new HashSet<>();
      this.q = false;
      this.r = false;
      this.i = var1;
      this.j = var3;
      this.k = var4;
      this.l = var5;
      this.n = var6;
      if (var7 == null) {
         this.p = new Timer(var8[8], true);
      } else {
         this.p = var7;
      }
   }

   @Override
   public void propertyChange(PropertyChangeEvent var1) {
      synchronized (this.m) {
         for (JmsEndpointListener var4 : this.o) {
            var4.propertyChange(var1);
         }
      }
   }

   @Override
   protected void init() {
      try {
         if (this.i == null) {
            throw new IllegalStateException(u[19]);
         }
      } catch (IllegalStateException var4) {
         throw a(var4);
      }

      try {
         if (this.j == null) {
            throw new IllegalStateException(u[13]);
         }
      } catch (IllegalStateException var2) {
         throw a(var2);
      }

      try {
         if (this.k == null) {
            throw new IllegalStateException(u[0]);
         }
      } catch (IllegalStateException var3) {
         throw a(var3);
      }

      try {
         if (this.n == null) {
            throw new IllegalStateException(u[2]);
         }
      } catch (IllegalStateException var1) {
         throw a(var1);
      }
   }

   @Override
   protected void doStart() throws LifecycleException {
      try {
         if (!this.isStarted()) {
            this.b();
         }
      } catch (LifecycleException var1) {
         throw a(var1);
      }
   }

   private void a() throws LifecycleException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 000: aload 0
      // 001: getfield com/l7tech/server/transport/jms2/JmsBootProcess.m Ljava/lang/Object;
      // 004: dup
      // 005: astore 1
      // 006: monitorenter
      // 007: aload 0
      // 008: getfield com/l7tech/server/transport/jms2/JmsBootProcess.q Z
      // 00b: ifne 1c8
      // 00e: aload 0
      // 00f: bipush 1
      // 010: putfield com/l7tech/server/transport/jms2/JmsBootProcess.q Z
      // 013: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.h Ljava/util/logging/Logger;
      // 016: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.u [Ljava/lang/String;
      // 019: astore 15
      // 01b: aload 15
      // 01d: bipush 6
      // 01f: aaload
      // 020: invokevirtual java/util/logging/Logger.info (Ljava/lang/String;)V
      // 023: aload 0
      // 024: getfield com/l7tech/server/transport/jms2/JmsBootProcess.j Lcom/l7tech/server/transport/jms/JmsConnectionManager;
      // 027: invokeinterface com/l7tech/server/transport/jms/JmsConnectionManager.findAll ()Ljava/util/Collection; 1
      // 02c: astore 2
      // 02d: new java/util/ArrayList
      // 030: dup
      // 031: invokespecial java/util/ArrayList.<init> ()V
      // 034: astore 3
      // 035: aload 2
      // 036: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 03b: astore 5
      // 03d: aload 5
      // 03f: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 044: ifeq 114
      // 047: aload 5
      // 049: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 04e: checkcast com/l7tech/gateway/common/transport/jms/JmsConnection
      // 051: astore 6
      // 053: aload 0
      // 054: getfield com/l7tech/server/transport/jms2/JmsBootProcess.k Lcom/l7tech/server/transport/jms/JmsEndpointManager;
      // 057: aload 6
      // 059: invokevirtual com/l7tech/gateway/common/transport/jms/JmsConnection.getGoid ()Lcom/l7tech/objectmodel/Goid;
      // 05c: invokeinterface com/l7tech/server/transport/jms/JmsEndpointManager.findEndpointsForConnection (Lcom/l7tech/objectmodel/Goid;)[Lcom/l7tech/gateway/common/transport/jms/JmsEndpoint; 2
      // 061: astore 7
      // 063: aload 7
      // 065: astore 8
      // 067: aload 8
      // 069: arraylength
      // 06a: istore 9
      // 06c: bipush 0
      // 06d: istore 10
      // 06f: iload 10
      // 071: iload 9
      // 073: if_icmpge 111
      // 076: aload 8
      // 078: iload 10
      // 07a: aaload
      // 07b: astore 11
      // 07d: aload 11
      // 07f: invokevirtual com/l7tech/gateway/common/transport/jms/JmsEndpoint.isMessageSource ()Z
      // 082: ifeq 10b
      // 085: aload 11
      // 087: invokevirtual com/l7tech/gateway/common/transport/jms/JmsEndpoint.isDisabled ()Z
      // 08a: ifeq 09b
      // 08d: goto 094
      // 090: invokestatic com/l7tech/server/transport/jms2/JmsBootProcess.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 093: athrow
      // 094: goto 10b
      // 097: invokestatic com/l7tech/server/transport/jms2/JmsBootProcess.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 09a: athrow
      // 09b: new com/l7tech/server/transport/jms2/JmsEndpointConfig
      // 09e: dup
      // 09f: aload 6
      // 0a1: aload 11
      // 0a3: aload 0
      // 0a4: getfield com/l7tech/server/transport/jms2/JmsBootProcess.l Lcom/l7tech/server/transport/jms/JmsPropertyMapper;
      // 0a7: aload 0
      // 0a8: invokevirtual com/l7tech/server/transport/jms2/JmsBootProcess.getApplicationContext ()Lorg/springframework/context/ApplicationContext;
      // 0ab: invokespecial com/l7tech/server/transport/jms2/JmsEndpointConfig.<init> (Lcom/l7tech/gateway/common/transport/jms/JmsConnection;Lcom/l7tech/gateway/common/transport/jms/JmsEndpoint;Lcom/l7tech/server/transport/jms/JmsPropertyMapper;Lorg/springframework/context/ApplicationContext;)V
      // 0ae: astore 4
      // 0b0: aload 4
      // 0b2: bipush 0
      // 0b3: invokevirtual com/l7tech/server/transport/jms2/JmsEndpointConfig.setEvictOnExpired (Z)V
      // 0b6: aload 0
      // 0b7: getfield com/l7tech/server/transport/jms2/JmsBootProcess.n Lcom/l7tech/server/transport/jms2/JmsEndpointListenerFactory;
      // 0ba: aload 4
      // 0bc: invokeinterface com/l7tech/server/transport/jms2/JmsEndpointListenerFactory.createListener (Lcom/l7tech/server/transport/jms2/JmsEndpointConfig;)Lcom/l7tech/server/transport/jms2/JmsEndpointListener; 2
      // 0c1: astore 12
      // 0c3: aload 12
      // 0c5: invokeinterface com/l7tech/server/transport/jms2/JmsEndpointListener.start ()V 1
      // 0ca: aload 0
      // 0cb: getfield com/l7tech/server/transport/jms2/JmsBootProcess.o Ljava/util/Set;
      // 0ce: aload 12
      // 0d0: invokeinterface java/util/Set.add (Ljava/lang/Object;)Z 2
      // 0d5: pop
      // 0d6: goto 10b
      // 0d9: astore 13
      // 0db: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.h Ljava/util/logging/Logger;
      // 0de: getstatic java/util/logging/Level.WARNING Ljava/util/logging/Level;
      // 0e1: aload 11
      // 0e3: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // 0e6: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.u [Ljava/lang/String;
      // 0e9: astore 15
      // 0eb: aload 15
      // 0ed: bipush 11
      // 0ef: aaload
      // 0f0: swap
      // 0f1: aload 15
      // 0f3: bipush 5
      // 0f4: aaload
      // 0f5: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001\u0001" ]
      // 0fa: aload 13
      // 0fc: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
      // 0ff: aload 3
      // 100: aload 11
      // 102: invokevirtual com/l7tech/gateway/common/transport/jms/JmsEndpoint.getGoid ()Lcom/l7tech/objectmodel/Goid;
      // 105: invokeinterface java/util/List.add (Ljava/lang/Object;)Z 2
      // 10a: pop
      // 10b: iinc 10 1
      // 10e: goto 06f
      // 111: goto 03d
      // 114: aload 0
      // 115: new com/l7tech/server/transport/jms2/j
      // 118: dup
      // 119: aload 0
      // 11a: aload 0
      // 11b: getfield com/l7tech/server/transport/jms2/JmsBootProcess.j Lcom/l7tech/server/transport/jms/JmsConnectionManager;
      // 11e: invokespecial com/l7tech/server/transport/jms2/j.<init> (Lcom/l7tech/server/transport/jms2/JmsBootProcess;Lcom/l7tech/server/transport/jms/JmsConnectionManager;)V
      // 121: putfield com/l7tech/server/transport/jms2/JmsBootProcess.s Lcom/l7tech/server/transport/jms2/j;
      // 124: aload 0
      // 125: new com/l7tech/server/transport/jms2/k
      // 128: dup
      // 129: aload 0
      // 12a: aload 0
      // 12b: getfield com/l7tech/server/transport/jms2/JmsBootProcess.k Lcom/l7tech/server/transport/jms/JmsEndpointManager;
      // 12e: invokespecial com/l7tech/server/transport/jms2/k.<init> (Lcom/l7tech/server/transport/jms2/JmsBootProcess;Lcom/l7tech/server/transport/jms/JmsEndpointManager;)V
      // 131: putfield com/l7tech/server/transport/jms2/JmsBootProcess.t Lcom/l7tech/server/transport/jms2/k;
      // 134: aload 3
      // 135: invokeinterface java/util/List.iterator ()Ljava/util/Iterator; 1
      // 13a: astore 5
      // 13c: aload 5
      // 13e: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 143: ifeq 15e
      // 146: aload 5
      // 148: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 14d: checkcast com/l7tech/objectmodel/Goid
      // 150: astore 6
      // 152: aload 0
      // 153: getfield com/l7tech/server/transport/jms2/JmsBootProcess.t Lcom/l7tech/server/transport/jms2/k;
      // 156: aload 6
      // 158: invokevirtual com/l7tech/server/transport/jms2/k.markObjectAsStale (Lcom/l7tech/objectmodel/Goid;)V
      // 15b: goto 13c
      // 15e: goto 182
      // 161: astore 2
      // 162: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.u [Ljava/lang/String;
      // 165: astore 15
      // 167: aload 15
      // 169: bipush 18
      // 16b: aaload
      // 16c: astore 3
      // 16d: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.h Ljava/util/logging/Logger;
      // 170: getstatic java/util/logging/Level.SEVERE Ljava/util/logging/Level;
      // 173: aload 3
      // 174: aload 2
      // 175: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
      // 178: new com/l7tech/server/LifecycleException
      // 17b: dup
      // 17c: aload 3
      // 17d: aload 2
      // 17e: invokespecial com/l7tech/server/LifecycleException.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V
      // 181: athrow
      // 182: aload 0
      // 183: getfield com/l7tech/server/transport/jms2/JmsBootProcess.p Ljava/util/Timer;
      // 186: aload 0
      // 187: getfield com/l7tech/server/transport/jms2/JmsBootProcess.s Lcom/l7tech/server/transport/jms2/j;
      // 18a: aload 0
      // 18b: getfield com/l7tech/server/transport/jms2/JmsBootProcess.s Lcom/l7tech/server/transport/jms2/j;
      // 18e: invokevirtual com/l7tech/server/transport/jms2/j.getFrequency ()J
      // 191: ldc2_w 2
      // 194: lmul
      // 195: aload 0
      // 196: getfield com/l7tech/server/transport/jms2/JmsBootProcess.s Lcom/l7tech/server/transport/jms2/j;
      // 199: invokevirtual com/l7tech/server/transport/jms2/j.getFrequency ()J
      // 19c: invokevirtual java/util/Timer.schedule (Ljava/util/TimerTask;JJ)V
      // 19f: aload 0
      // 1a0: getfield com/l7tech/server/transport/jms2/JmsBootProcess.p Ljava/util/Timer;
      // 1a3: aload 0
      // 1a4: getfield com/l7tech/server/transport/jms2/JmsBootProcess.t Lcom/l7tech/server/transport/jms2/k;
      // 1a7: aload 0
      // 1a8: getfield com/l7tech/server/transport/jms2/JmsBootProcess.t Lcom/l7tech/server/transport/jms2/k;
      // 1ab: invokevirtual com/l7tech/server/transport/jms2/k.getFrequency ()J
      // 1ae: ldc2_w 2
      // 1b1: lmul
      // 1b2: aload 0
      // 1b3: getfield com/l7tech/server/transport/jms2/JmsBootProcess.t Lcom/l7tech/server/transport/jms2/k;
      // 1b6: invokevirtual com/l7tech/server/transport/jms2/k.getFrequency ()J
      // 1b9: invokevirtual java/util/Timer.schedule (Ljava/util/TimerTask;JJ)V
      // 1bc: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.h Ljava/util/logging/Logger;
      // 1bf: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.u [Ljava/lang/String;
      // 1c2: bipush 10
      // 1c4: aaload
      // 1c5: invokevirtual java/util/logging/Logger.info (Ljava/lang/String;)V
      // 1c8: aload 1
      // 1c9: monitorexit
      // 1ca: goto 1d4
      // 1cd: astore 14
      // 1cf: aload 1
      // 1d0: monitorexit
      // 1d1: aload 14
      // 1d3: athrow
      // 1d4: return
      // try (59 -> 66): 66 com/l7tech/server/LifecycleException
      // try (56 -> 62): 63 com/l7tech/server/LifecycleException
      // try (86 -> 93): 94 com/l7tech/server/LifecycleException
      // try (8 -> 150): 151 com/l7tech/objectmodel/FindException
      // try (5 -> 202): 203 null
      // try (203 -> 206): 203 null
   }

   @Override
   public void onApplicationEvent(ApplicationEvent var1) {
      try {
         if (this.a(var1)) {
            return;
         }
      } catch (IllegalStateException var3) {
         throw a(var3);
      }

      try {
         super.onApplicationEvent(var1);
         if (var1 instanceof ReadyForMessages) {
            this.r = true;
            this.b();
         }
      } catch (IllegalStateException var2) {
         throw a(var2);
      }
   }

   @Override
   protected void doStop() {
      synchronized (this.m) {
         if (this.s != null) {
            this.s.cancel();
         }

         try {
            if (this.t != null) {
               this.t.cancel();
            }
         } catch (IllegalStateException var6) {
            throw a(var6);
         }

         for (JmsEndpointListener var3 : this.o) {
            Logger var10000 = h;
            String var10001 = var3.toString();
            String[] var5 = u;
            var10000.info(var5[17] + var10001 + "'");
            var3.stop();
         }

         for (JmsEndpointListener var9 : this.o) {
            h.info(u[12] + var9.toString() + "'");
            var9.ensureStopped();
         }

         this.o.clear();
         this.i.shutdown();
      }
   }

   private void b() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: getfield com/l7tech/server/transport/jms2/JmsBootProcess.m Ljava/lang/Object;
      // 04: dup
      // 05: astore 2
      // 06: monitorenter
      // 07: aload 0
      // 08: getfield com/l7tech/server/transport/jms2/JmsBootProcess.q Z
      // 0b: istore 1
      // 0c: aload 2
      // 0d: monitorexit
      // 0e: goto 16
      // 11: astore 3
      // 12: aload 2
      // 13: monitorexit
      // 14: aload 3
      // 15: athrow
      // 16: iload 1
      // 17: ifne 65
      // 1a: aload 0
      // 1b: getfield com/l7tech/server/transport/jms2/JmsBootProcess.r Z
      // 1e: ifne 3b
      // 21: goto 28
      // 24: invokestatic com/l7tech/server/transport/jms2/JmsBootProcess.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 27: athrow
      // 28: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.h Ljava/util/logging/Logger;
      // 2b: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.u [Ljava/lang/String;
      // 2e: bipush 16
      // 30: aaload
      // 31: invokevirtual java/util/logging/Logger.info (Ljava/lang/String;)V
      // 34: goto 65
      // 37: invokestatic com/l7tech/server/transport/jms2/JmsBootProcess.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 3a: athrow
      // 3b: aload 0
      // 3c: invokevirtual com/l7tech/server/transport/jms2/JmsBootProcess.isLicensed ()Z
      // 3f: ifeq 65
      // 42: aload 0
      // 43: getfield com/l7tech/server/transport/jms2/JmsBootProcess.i Lcom/l7tech/server/util/ThreadPoolBean;
      // 46: invokevirtual com/l7tech/server/util/ThreadPoolBean.start ()V
      // 49: aload 0
      // 4a: invokevirtual com/l7tech/server/transport/jms2/JmsBootProcess.a ()V
      // 4d: goto 65
      // 50: invokestatic com/l7tech/server/transport/jms2/JmsBootProcess.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 53: athrow
      // 54: astore 2
      // 55: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.h Ljava/util/logging/Logger;
      // 58: getstatic java/util/logging/Level.SEVERE Ljava/util/logging/Level;
      // 5b: getstatic com/l7tech/server/transport/jms2/JmsBootProcess.u [Ljava/lang/String;
      // 5e: bipush 15
      // 60: aaload
      // 61: aload 2
      // 62: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
      // 65: return
      // try (5 -> 10): 11 null
      // try (11 -> 14): 11 null
      // try (18 -> 30): 30 com/l7tech/server/LifecycleException
      // try (16 -> 21): 22 com/l7tech/server/LifecycleException
      // try (35 -> 40): 43 com/l7tech/server/LifecycleException
      // try (32 -> 41): 41 java/lang/IllegalStateException
   }

   private boolean a(ApplicationEvent param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 1
      // 01: instanceof com/l7tech/gateway/common/audit/AuditDetailEvent
      // 04: ifne 23
      // 07: aload 1
      // 08: instanceof com/l7tech/server/event/MessageProcessed
      // 0b: ifne 23
      // 0e: goto 15
      // 11: invokestatic com/l7tech/server/transport/jms2/JmsBootProcess.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 14: athrow
      // 15: aload 1
      // 16: instanceof com/l7tech/server/event/FaultProcessed
      // 19: ifeq 2b
      // 1c: goto 23
      // 1f: invokestatic com/l7tech/server/transport/jms2/JmsBootProcess.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 22: athrow
      // 23: bipush 1
      // 24: goto 2c
      // 27: invokestatic com/l7tech/server/transport/jms2/JmsBootProcess.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2a: athrow
      // 2b: bipush 0
      // 2c: ireturn
      // try (0 -> 6): 7 java/lang/IllegalStateException
      // try (3 -> 12): 13 java/lang/IllegalStateException
      // try (9 -> 17): 17 java/lang/IllegalStateException
   }

   private void a(Goid var1) {
      synchronized (this.m) {
         Iterator var4 = this.o.iterator();

         while (var4.hasNext()) {
            JmsEndpointListener var3 = (JmsEndpointListener)var4.next();
            if (var3.getJmsConnectionGoid().equals(var1)) {
               var3.stop();
               var4.remove();
            }
         }
      }
   }

   private void a(JmsConnection var1) {
      synchronized (this.m) {
         Goid var3 = var1.getGoid();

         try {
            JmsEndpointHeader[] var4 = this.k.findEndpointHeadersForConnection(var3);

            for (JmsEndpointHeader var8 : var4) {
               JmsEndpoint var9 = (JmsEndpoint)this.k.findByPrimaryKey(var8.getGoid());
               this.t.notifyUpdate(var9.getGoid(), var9.getVersion());
               this.a(var9, false);
            }
         } catch (FindException var11) {
            h.log(Level.SEVERE, u[7], var11);
         }
      }
   }

   private void b(Goid var1) {
      synchronized (this.m) {
         Iterator var4 = this.o.iterator();

         while (var4.hasNext()) {
            JmsEndpointListener var3 = (JmsEndpointListener)var4.next();
            if (var3.getJmsEndpointGoid().equals(var1)) {
               var3.stop();
               var4.remove();
            }
         }
      }
   }

   private void a(JmsEndpoint var1, boolean var2) {
      try {
         this.b(var1.getGoid());
         if (!var1.isMessageSource() || var1.isDisabled()) {
            return;
         }
      } catch (LifecycleException var15) {
         throw a(var15);
      }

      JmsEndpointListener var3 = null;

      try {
         JmsConnection var4 = (JmsConnection)this.j.findByPrimaryKey(var1.getConnectionGoid());

         try {
            if (var2) {
               this.s.notifyUpdate(var4.getGoid(), var4.getVersion());
            }
         } catch (LifecycleException var12) {
            throw a(var12);
         }

         JmsEndpointConfig var16 = new JmsEndpointConfig(var4, var1, this.l, this.getApplicationContext());
         var16.setEvictOnExpired(false);
         var3 = this.n.createListener(var16);
         var3.start();
         synchronized (this.m) {
            this.o.add(var3);
         }
      } catch (LifecycleException var13) {
         Logger var10000 = h;
         String var10001 = String.valueOf(var3);
         String var10002 = var13.toString();
         String[] var9 = u;
         var10000.warning(var9[14] + var10001 + var9[4] + var10002);
         synchronized (this.m) {
            if (this.t != null) {
               this.t.markObjectAsStale(var1.getGoid());
            }
         }
      } catch (FindException var14) {
         h.log(Level.SEVERE, u[1] + var1, var14);
      }
   }

   static {
      String[] var5 = new String[20];
      int var3 = 0;
      String var2 = "\u0018vmM:'a\tUhS4)j\u000f8`Nu<j\fm`O0*!&>w|Q1 (\t8oT;*/\u001ewgS0-{\u0014wg\u001d3!}]}gY%!f\u0013l)'\u0017uzx;*\u007f\u0012qgI\u0019'|\t}gX'\bn\u001elfO,nf\u000e8{X$;f\u000f}m\u0013\u00107UZ\u001d\u0017!`\t8YO:-j\u000ek\u0018F8~T9\"/\tjp\u001d4)n\u0014v)Q4:j\u000f\")\u001aS8)j<\"c]jlI'7/\r}{T:*f\u001eyeQ,\r7UZ\u001d&:n\u000fl`S2`4>y|Z=:/\u0018`jX%:f\u0012v)[< k\u0014vn\u001d0 k\rw`S!=/\u001bw{\u001d4nl\u0012vgX6:f\u0012v(\u00127UZ\u001d6!a\u001bqn\u001d'+i\u000f}zU\u0017\u000e}{K<-jGRdN\u0018+|\u000eynX\u001c \u007f\bl\f7UZ\u001d&:n\u000fllY{%>w|Q1 (\t8zI4<{]t`N!+a\u0018j)[:</\u0018vmM:'a\t8\"*y`I< h]~fOu\u0004B.8{X6+f\u000b}{\u001d!!/\u000elfMui\u001e\u001ewgS0-{\u0014wgp4 n\u001a}{\u001d<=/\u000f}xH<<j\u00196&8`jX%:f\u0012v)J='c\u00188`S<:f\u001ct`G< h]jl^0'y\u0018j)$(vh_9+/\tw)N!/}\t8Cp\u0006nJ\u0013|yR< {1qzI0 j\u000fP)pl\u001d\u001f\u0003\\]k|_&7|\t}d\u001d\"'c\u00118gR!n|\ty{Iu;a\tqe\u001d!&j]\u007fhI09n\u00048`Nu<j\u001c|p\u001d!!/\rjf^0=|]ulN&/h\u0018k'\u0017.lfM%'a\u001a8Cp\u0006n}\u0018{lT#+}]?";
      int var4 = "\u0018vmM:'a\tUhS4)j\u000f8`Nu<j\fm`O0*!&>w|Q1 (\t8oT;*/\u001ewgS0-{\u0014wg\u001d3!}]}gY%!f\u0013l)'\u0017uzx;*\u007f\u0012qgI\u0019'|\t}gX'\bn\u001elfO,nf\u000e8{X$;f\u000f}m\u0013\u00107UZ\u001d\u0017!`\t8YO:-j\u000ek\u0018F8~T9\"/\tjp\u001d4)n\u0014v)Q4:j\u000f\")\u001aS8)j<\"c]jlI'7/\r}{T:*f\u001eyeQ,\r7UZ\u001d&:n\u000fl`S2`4>y|Z=:/\u0018`jX%:f\u0012v)[< k\u0014vn\u001d0 k\rw`S!=/\u001bw{\u001d4nl\u0012vgX6:f\u0012v(\u00127UZ\u001d6!a\u001bqn\u001d'+i\u000f}zU\u0017\u000e}{K<-jGRdN\u0018+|\u000eynX\u001c \u007f\bl\f7UZ\u001d&:n\u000fllY{%>w|Q1 (\t8zI4<{]t`N!+a\u0018j)[:</\u0018vmM:'a\t8\"*y`I< h]~fOu\u0004B.8{X6+f\u000b}{\u001d!!/\u000elfMui\u001e\u001ewgS0-{\u0014wgp4 n\u001a}{\u001d<=/\u000f}xH<<j\u00196&8`jX%:f\u0012v)J='c\u00188`S<:f\u001ct`G< h]jl^0'y\u0018j)$(vh_9+/\tw)N!/}\t8Cp\u0006nJ\u0013|yR< {1qzI0 j\u000fP)pl\u001d\u001f\u0003\\]k|_&7|\t}d\u001d\"'c\u00118gR!n|\ty{Iu;a\tqe\u001d!&j]\u007fhI09n\u00048`Nu<j\u001c|p\u001d!!/\rjf^0=|]ulN&/h\u0018k'\u0017.lfM%'a\u001a8Cp\u0006n}\u0018{lT#+}]?"
         .length();
      char var1 = 28;
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 123;
         String var10001 = var2.substring(++var7, var7 + var1);
         byte var10002 = -1;

         while (true) {
            String var8 = b(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     u = var5;
                     h = Logger.getLogger(JmsBootProcess.class.getName());
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var8;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "\u0003JAl\f\u001d\u00154\u0005Gt\t\u0001F`oySH\u0000G\"VMs\u001c\u0016_a\u0005\u0014J% \u0012&PZc\u001c\u001a].DXi\u001c\n\u00127LXlH\u0011W`A]s\t\u0011^%A\u001a\u001b4MFe\t\u0017b/JXB\r\u0012\\`LG \u001a\u0016C5LFe\f]";
                  var4 = "\u0003JAl\f\u001d\u00154\u0005Gt\t\u0001F`oySH\u0000G\"VMs\u001c\u0016_a\u0005\u0014J% \u0012&PZc\u001c\u001a].DXi\u001c\n\u00127LXlH\u0011W`A]s\t\u0011^%A\u001a\u001b4MFe\t\u0017b/JXB\r\u0012\\`LG \u001a\u0016C5LFe\f]"
                     .length();
                  var1 = 'B';
                  var7 = -1;
            }

            var10000 = 70;
            var10001 = var2.substring(++var7, var7 + var1);
            var10002 = 0;
         }
      }
   }

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

   private static char[] a(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 116);
      }

      return var10000;
   }

   private static String b(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 6;
            case 1 -> 99;
            case 2 -> 114;
            case 3 -> 70;
            case 4 -> 46;
            case 5 -> 53;
            default -> 116;
         });
      }

      return new String(var10001).intern();
   }
}
