package com.l7tech.server.service.resolution;

import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.gateway.common.audit.LoggingAudit;
import com.l7tech.gateway.common.audit.SystemMessages;
import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.gateway.common.transport.ResolutionConfiguration;
import com.l7tech.message.Message;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.server.event.EntityClassEvent;
import com.l7tech.server.transport.ResolutionConfigurationManager;
import com.l7tech.server.util.PostStartupApplicationListener;
import com.l7tech.util.Pair;
import com.l7tech.util.Functions.TernaryThrows;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationEvent;

public class ServiceResolutionManager implements PostStartupApplicationListener, InitializingBean {
   private static final Logger a;
   private final ResolutionConfigurationManager b;
   private final String c;
   private final Collection<ServiceResolver> d;
   private final Collection<ServiceResolver> e;
   private final Collection<ServiceResolver> f;
   private static final String[] g;

   public ServiceResolutionManager(ResolutionConfigurationManager var1, String var2, Collection<ServiceResolver> var3, Collection<ServiceResolver> var4) {
      this.b = var1;
      this.c = var2;
      this.d = Collections.unmodifiableCollection(new ArrayList<>(var3));
      this.e = Collections.unmodifiableCollection(new ArrayList<>(var4));
      ArrayList var5 = new ArrayList();
      var5.addAll(this.d);
      var5.addAll(this.e);
      this.f = Collections.unmodifiableCollection(var5);
   }

   public void setServiceResolutionHelper(ServiceResolutionHelper var1) {
      this.f.forEach(var1x -> var1x.setServiceResolutionHelper(var1));
   }

   public PublishedService resolve(Audit param1, Message param2, ServiceResolutionManager.ServiceResolutionListener param3, Collection<PublishedService> param4) throws ServiceResolutionException {
      // $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 4
      // 002: invokeinterface java/util/Collection.isEmpty ()Z 1
      // 007: ifeq 019
      // 00a: aload 1
      // 00b: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_NO_SERVICES Lcom/l7tech/gateway/common/audit/Messages$M;
      // 00e: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V 2
      // 013: aconst_null
      // 014: areturn
      // 015: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 018: athrow
      // 019: bipush 1
      // 01a: newarray 4
      // 01c: dup
      // 01d: bipush 0
      // 01e: bipush 0
      // 01f: bastore
      // 020: astore 5
      // 022: new com/l7tech/server/service/resolution/d
      // 025: dup
      // 026: aload 0
      // 027: aload 3
      // 028: aload 5
      // 02a: aload 2
      // 02b: invokespecial com/l7tech/server/service/resolution/d.<init> (Lcom/l7tech/server/service/resolution/ServiceResolutionManager;Lcom/l7tech/server/service/resolution/ServiceResolutionManager$ServiceResolutionListener;[ZLcom/l7tech/message/Message;)V
      // 02e: astore 6
      // 030: aload 0
      // 031: aload 1
      // 032: new java/util/HashMap
      // 035: dup
      // 036: invokespecial java/util/HashMap.<init> ()V
      // 039: aload 6
      // 03b: aload 4
      // 03d: bipush 1
      // 03e: invokevirtual com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/gateway/common/audit/Audit;Ljava/util/Map;Lcom/l7tech/util/Functions$TernaryThrows;Ljava/util/Collection;Z)Ljava/util/Collection;
      // 041: astore 4
      // 043: aload 4
      // 045: ifnonnull 04e
      // 048: aconst_null
      // 049: areturn
      // 04a: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 04d: athrow
      // 04e: aload 4
      // 050: invokeinterface java/util/Collection.isEmpty ()Z 1
      // 055: ifeq 067
      // 058: aload 1
      // 059: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_NO_MATCH Lcom/l7tech/gateway/common/audit/Messages$M;
      // 05c: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V 2
      // 061: aconst_null
      // 062: areturn
      // 063: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 066: athrow
      // 067: aload 4
      // 069: invokeinterface java/util/Collection.size ()I 1
      // 06e: bipush 1
      // 06f: if_icmple 0b7
      // 072: aload 3
      // 073: ifnull 0a9
      // 076: goto 07d
      // 079: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 07c: athrow
      // 07d: aload 5
      // 07f: bipush 0
      // 080: baload
      // 081: ifne 0a9
      // 084: goto 08b
      // 087: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 08a: athrow
      // 08b: aload 5
      // 08d: bipush 0
      // 08e: bipush 1
      // 08f: bastore
      // 090: aload 3
      // 091: aload 2
      // 092: aload 4
      // 094: invokeinterface com/l7tech/server/service/resolution/ServiceResolutionManager$ServiceResolutionListener.notifyMessageBodyAccess (Lcom/l7tech/message/Message;Ljava/util/Collection;)Z 3
      // 099: ifne 0a9
      // 09c: goto 0a3
      // 09f: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 0a2: athrow
      // 0a3: aconst_null
      // 0a4: areturn
      // 0a5: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 0a8: athrow
      // 0a9: aload 2
      // 0aa: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/message/Message;)Z
      // 0ad: ifne 0b7
      // 0b0: aload 4
      // 0b2: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Ljava/util/Collection;)Ljava/util/Collection;
      // 0b5: astore 4
      // 0b7: aload 4
      // 0b9: invokeinterface java/util/Collection.size ()I 1
      // 0be: bipush 1
      // 0bf: if_icmpeq 0d1
      // 0c2: aload 1
      // 0c3: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_MULTI Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0c6: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V 2
      // 0cb: aconst_null
      // 0cc: areturn
      // 0cd: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 0d0: athrow
      // 0d1: aload 4
      // 0d3: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 0d8: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 0dd: checkcast com/l7tech/gateway/common/service/PublishedService
      // 0e0: astore 7
      // 0e2: aload 7
      // 0e4: invokevirtual com/l7tech/gateway/common/service/PublishedService.isSoap ()Z
      // 0e7: ifeq 0f9
      // 0ea: aload 7
      // 0ec: invokevirtual com/l7tech/gateway/common/service/PublishedService.isLaxResolution ()Z
      // 0ef: ifeq 100
      // 0f2: goto 0f9
      // 0f5: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 0f8: athrow
      // 0f9: aload 7
      // 0fb: areturn
      // 0fc: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 0ff: athrow
      // 100: aload 3
      // 101: ifnull 12b
      // 104: aload 5
      // 106: bipush 0
      // 107: baload
      // 108: ifne 12b
      // 10b: goto 112
      // 10e: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 111: athrow
      // 112: aload 3
      // 113: aload 2
      // 114: aload 4
      // 116: invokeinterface com/l7tech/server/service/resolution/ServiceResolutionManager$ServiceResolutionListener.notifyMessageBodyAccess (Lcom/l7tech/message/Message;Ljava/util/Collection;)Z 3
      // 11b: ifne 12b
      // 11e: goto 125
      // 121: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 124: athrow
      // 125: aconst_null
      // 126: areturn
      // 127: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 12a: athrow
      // 12b: aload 2
      // 12c: ldc com/l7tech/message/SoapKnob
      // 12e: invokevirtual com/l7tech/message/Message.getKnob (Ljava/lang/Class;)Ljava/lang/Object;
      // 131: ifnonnull 143
      // 134: aload 1
      // 135: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_NOT_SOAP Lcom/l7tech/gateway/common/audit/Messages$M;
      // 138: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;)V 2
      // 13d: aconst_null
      // 13e: areturn
      // 13f: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 142: athrow
      // 143: aload 3
      // 144: ifnull 157
      // 147: aload 3
      // 148: aload 2
      // 149: aload 7
      // 14b: invokeinterface com/l7tech/server/service/resolution/ServiceResolutionManager$ServiceResolutionListener.notifyMessageValidation (Lcom/l7tech/message/Message;Lcom/l7tech/gateway/common/service/PublishedService;)V 3
      // 150: goto 157
      // 153: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 156: athrow
      // 157: aload 0
      // 158: getfield com/l7tech/server/service/resolution/ServiceResolutionManager.e Ljava/util/Collection;
      // 15b: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 160: astore 8
      // 162: aload 8
      // 164: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 169: ifeq 1c7
      // 16c: aload 8
      // 16e: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 173: checkcast com/l7tech/server/service/resolution/ServiceResolver
      // 176: astore 9
      // 178: new java/util/HashMap
      // 17b: dup
      // 17c: invokespecial java/util/HashMap.<init> ()V
      // 17f: astore 10
      // 181: aload 9
      // 183: aload 2
      // 184: aload 10
      // 186: invokevirtual com/l7tech/server/service/resolution/ServiceResolver.populateResolutionParameters (Lcom/l7tech/message/Message;Ljava/util/Map;)V
      // 189: aload 9
      // 18b: aload 10
      // 18d: aload 4
      // 18f: invokevirtual com/l7tech/server/service/resolution/ServiceResolver.resolve (Ljava/util/Map;Ljava/util/Collection;)Lcom/l7tech/server/service/resolution/Result;
      // 192: astore 11
      // 194: aload 11
      // 196: invokevirtual com/l7tech/server/service/resolution/Result.getMatches ()Ljava/util/Set;
      // 199: invokeinterface java/util/Set.isEmpty ()Z 1
      // 19e: ifeq 1c4
      // 1a1: aload 1
      // 1a2: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_OPERATION_MISMATCH Lcom/l7tech/gateway/common/audit/Messages$M;
      // 1a5: bipush 2
      // 1a6: anewarray 295
      // 1a9: dup
      // 1aa: bipush 0
      // 1ab: aload 7
      // 1ad: invokevirtual com/l7tech/gateway/common/service/PublishedService.getName ()Ljava/lang/String;
      // 1b0: aastore
      // 1b1: dup
      // 1b2: bipush 1
      // 1b3: aload 7
      // 1b5: invokevirtual com/l7tech/gateway/common/service/PublishedService.getId ()Ljava/lang/String;
      // 1b8: aastore
      // 1b9: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // 1be: aconst_null
      // 1bf: areturn
      // 1c0: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 1c3: athrow
      // 1c4: goto 162
      // 1c7: aload 1
      // 1c8: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_RESOLVED Lcom/l7tech/gateway/common/audit/Messages$M;
      // 1cb: bipush 2
      // 1cc: anewarray 295
      // 1cf: dup
      // 1d0: bipush 0
      // 1d1: aload 7
      // 1d3: invokevirtual com/l7tech/gateway/common/service/PublishedService.getName ()Ljava/lang/String;
      // 1d6: aastore
      // 1d7: dup
      // 1d8: bipush 1
      // 1d9: aload 7
      // 1db: invokevirtual com/l7tech/gateway/common/service/PublishedService.getId ()Ljava/lang/String;
      // 1de: aastore
      // 1df: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // 1e4: aload 7
      // 1e6: areturn
      // try (0 -> 8): 8 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (35 -> 39): 39 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (41 -> 49): 49 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (51 -> 57): 58 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (55 -> 64): 65 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (60 -> 76): 77 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (67 -> 81): 81 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (89 -> 98): 98 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (105 -> 111): 112 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (108 -> 116): 116 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (118 -> 124): 125 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (120 -> 132): 133 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (127 -> 137): 137 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (139 -> 148): 148 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (150 -> 156): 157 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (183 -> 204): 204 com/l7tech/server/service/resolution/ServiceResolutionException
   }

   public Collection<PublishedService> resolve(@Nullable String param1, @Nullable String param2, @Nullable String param3, Collection<PublishedService> param4) throws ServiceResolutionException {
      // $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 4
      // 02: invokeinterface java/util/Collection.isEmpty ()Z 1
      // 07: ifeq 12
      // 0a: invokestatic java/util/Collections.emptySet ()Ljava/util/Set;
      // 0d: areturn
      // 0e: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 11: athrow
      // 12: new java/util/HashMap
      // 15: dup
      // 16: invokespecial java/util/HashMap.<init> ()V
      // 19: astore 5
      // 1b: aload 1
      // 1c: ifnull 5a
      // 1f: aload 5
      // 21: ldc com/l7tech/server/service/resolution/UriResolver
      // 23: invokevirtual java/lang/Class.getName ()Ljava/lang/String;
      // 26: getstatic com/l7tech/server/service/resolution/ServiceResolutionManager.g [Ljava/lang/String;
      // 29: bipush 2
      // 2a: aaload
      // 2b: invokedynamic makeConcatWithConstants (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" ]
      // 30: aload 1
      // 31: invokeinterface java/util/Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 3
      // 36: pop
      // 37: aload 5
      // 39: ldc com/l7tech/server/service/resolution/CaseInsensitiveUriResolver
      // 3b: invokevirtual java/lang/Class.getName ()Ljava/lang/String;
      // 3e: getstatic com/l7tech/server/service/resolution/ServiceResolutionManager.g [Ljava/lang/String;
      // 41: bipush 6
      // 43: aaload
      // 44: invokedynamic makeConcatWithConstants (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" ]
      // 49: aload 1
      // 4a: invokevirtual java/lang/String.toLowerCase ()Ljava/lang/String;
      // 4d: invokeinterface java/util/Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 3
      // 52: pop
      // 53: goto 5a
      // 56: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 59: athrow
      // 5a: aload 2
      // 5b: ifnull 7e
      // 5e: aload 5
      // 60: ldc com/l7tech/server/service/resolution/SoapActionResolver
      // 62: invokevirtual java/lang/Class.getName ()Ljava/lang/String;
      // 65: getstatic com/l7tech/server/service/resolution/ServiceResolutionManager.g [Ljava/lang/String;
      // 68: bipush 6
      // 6a: aaload
      // 6b: invokedynamic makeConcatWithConstants (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" ]
      // 70: aload 2
      // 71: invokeinterface java/util/Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 3
      // 76: pop
      // 77: goto 7e
      // 7a: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 7d: athrow
      // 7e: aload 3
      // 7f: ifnull a2
      // 82: aload 5
      // 84: ldc com/l7tech/server/service/resolution/UrnResolver
      // 86: invokevirtual java/lang/Class.getName ()Ljava/lang/String;
      // 89: getstatic com/l7tech/server/service/resolution/ServiceResolutionManager.g [Ljava/lang/String;
      // 8c: bipush 6
      // 8e: aaload
      // 8f: invokedynamic makeConcatWithConstants (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" ]
      // 94: aload 3
      // 95: invokeinterface java/util/Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 3
      // 9a: pop
      // 9b: goto a2
      // 9e: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // a1: athrow
      // a2: aload 0
      // a3: new com/l7tech/gateway/common/audit/LoggingAudit
      // a6: dup
      // a7: getstatic com/l7tech/server/service/resolution/ServiceResolutionManager.a Ljava/util/logging/Logger;
      // aa: invokespecial com/l7tech/gateway/common/audit/LoggingAudit.<init> (Ljava/util/logging/Logger;)V
      // ad: aload 5
      // af: aconst_null
      // b0: aload 4
      // b2: bipush 1
      // b3: invokevirtual com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/gateway/common/audit/Audit;Ljava/util/Map;Lcom/l7tech/util/Functions$TernaryThrows;Ljava/util/Collection;Z)Ljava/util/Collection;
      // b6: astore 4
      // b8: aload 4
      // ba: ifnull ce
      // bd: aload 4
      // bf: invokeinterface java/util/Collection.isEmpty ()Z 1
      // c4: ifeq d6
      // c7: goto ce
      // ca: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // cd: athrow
      // ce: invokestatic java/util/Collections.emptySet ()Ljava/util/Set;
      // d1: areturn
      // d2: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // d5: athrow
      // d6: aload 4
      // d8: areturn
      // try (0 -> 5): 5 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (11 -> 34): 35 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (37 -> 49): 50 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (52 -> 64): 65 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (78 -> 83): 84 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (80 -> 88): 88 com/l7tech/server/service/resolution/ServiceResolutionException
   }

   public void notifyServiceCreated(Audit var1, PublishedService var2) {
      for (ServiceResolver var4 : this.f) {
         try {
            try {
               if (var2.isDisabled()) {
                  var4.serviceDeleted(var2);
                  continue;
               }
            } catch (ServiceResolutionException var6) {
               throw a(var6);
            }

            var4.serviceCreated(var2);
         } catch (ServiceResolutionException var7) {
            var1.logAndAudit(SystemMessages.SERVICE_WSDL_ERROR, new String[]{var2.displayName(), var7.getMessage()}, var7);
         }
      }
   }

   public void notifyServiceUpdated(Audit var1, PublishedService var2) {
      for (ServiceResolver var4 : this.f) {
         try {
            try {
               if (var2.isDisabled()) {
                  var4.serviceDeleted(var2);
                  continue;
               }
            } catch (ServiceResolutionException var6) {
               throw a(var6);
            }

            var4.serviceUpdated(var2);
         } catch (ServiceResolutionException var7) {
            var1.logAndAudit(SystemMessages.SERVICE_WSDL_ERROR, new String[]{var2.displayName(), var7.getMessage()}, var7);
         }
      }
   }

   public void notifyServiceDeleted(PublishedService var1) {
      for (ServiceResolver var3 : this.f) {
         var3.serviceDeleted(var1);
      }
   }

   public void checkResolution(PublishedService var1, Collection<PublishedService> var2) throws ServiceResolutionException {
      Collection var3 = Collections.singleton(Collections.emptyMap());

      for (ServiceResolver var5 : this.d) {
         var3 = var5.generateResolutionParameters(var1, var3);
      }

      ArrayList var15 = new ArrayList();
      LoggingAudit var16 = new LoggingAudit(a);

      for (Map var7 : var3) {
         String var10001 = UriResolver.class.getName();
         String[] var11 = g;
         var7.put(var10001 + var11[3], Boolean.TRUE);
         var7.put(CaseInsensitiveUriResolver.class.getName() + var11[5], Boolean.TRUE);
         Collection var8 = this.a(var16, var7, null, var2, false);

         try {
            if (var8 == null) {
               continue;
            }
         } catch (ServiceResolutionException var14) {
            throw a(var14);
         }

         for (PublishedService var10 : var8) {
            try {
               if (!Goid.equals(var10.getGoid(), var1.getGoid())) {
                  var15.add(new Pair(var7, var10));
               }
            } catch (ServiceResolutionException var13) {
               throw a(var13);
            }
         }
      }

      try {
         if (!var15.isEmpty()) {
            throw new NonUniqueServiceResolutionException(var15);
         }
      } catch (ServiceResolutionException var12) {
         throw a(var12);
      }
   }

   @Override
   public void onApplicationEvent(ApplicationEvent var1) {
      if (var1 instanceof EntityClassEvent var2 && ResolutionConfiguration.class.equals(var2.getEntityClass())) {
         this.b();
      }
   }

   public void afterPropertiesSet() throws Exception {
      this.b();
   }

   Collection<ServiceResolver> a() {
      return this.f;
   }

   private Collection<PublishedService> a(
      Audit param1,
      Map<String, Object> param2,
      TernaryThrows<Boolean, ServiceResolver, Map<String, Object>, Collection<PublishedService>, ServiceResolutionException> param3,
      Collection<PublishedService> param4,
      boolean param5
   ) throws ServiceResolutionException {
      // $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/service/resolution/ServiceResolutionManager.d Ljava/util/Collection;
      // 04: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 09: astore 6
      // 0b: aload 6
      // 0d: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 12: ifeq e7
      // 15: aload 6
      // 17: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 1c: checkcast com/l7tech/server/service/resolution/ServiceResolver
      // 1f: astore 7
      // 21: aload 3
      // 22: ifnull 46
      // 25: aload 3
      // 26: aload 7
      // 28: aload 2
      // 29: aload 4
      // 2b: invokeinterface com/l7tech/util/Functions$TernaryThrows.call (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 4
      // 30: checkcast java/lang/Boolean
      // 33: invokevirtual java/lang/Boolean.booleanValue ()Z
      // 36: ifne 46
      // 39: goto 40
      // 3c: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 3f: athrow
      // 40: aconst_null
      // 41: areturn
      // 42: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 45: athrow
      // 46: aload 7
      // 48: aload 2
      // 49: aload 4
      // 4b: invokevirtual com/l7tech/server/service/resolution/ServiceResolver.resolve (Ljava/util/Map;Ljava/util/Collection;)Lcom/l7tech/server/service/resolution/Result;
      // 4e: astore 9
      // 50: aload 9
      // 52: getstatic com/l7tech/server/service/resolution/Result.NOT_APPLICABLE Lcom/l7tech/server/service/resolution/Result;
      // 55: if_acmpne 5f
      // 58: goto 0b
      // 5b: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 5e: athrow
      // 5f: aload 9
      // 61: getstatic com/l7tech/server/service/resolution/Result.NO_MATCH Lcom/l7tech/server/service/resolution/Result;
      // 64: if_acmpne 82
      // 67: aload 1
      // 68: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_FAILED_EARLY Lcom/l7tech/gateway/common/audit/Messages$M;
      // 6b: bipush 1
      // 6c: anewarray 295
      // 6f: dup
      // 70: bipush 0
      // 71: aload 7
      // 73: invokevirtual com/l7tech/server/service/resolution/ServiceResolver.getSimpleName ()Ljava/lang/String;
      // 76: aastore
      // 77: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // 7c: aconst_null
      // 7d: areturn
      // 7e: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // 81: athrow
      // 82: aload 9
      // 84: invokevirtual com/l7tech/server/service/resolution/Result.getMatches ()Ljava/util/Set;
      // 87: astore 8
      // 89: aload 8
      // 8b: invokeinterface java/util/Set.size ()I 1
      // 90: istore 10
      // 92: iload 5
      // 94: ifeq c0
      // 97: iload 10
      // 99: bipush 1
      // 9a: if_icmpne c0
      // 9d: goto a4
      // a0: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // a3: athrow
      // a4: aload 1
      // a5: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_RESOLVED_EARLY Lcom/l7tech/gateway/common/audit/Messages$M;
      // a8: bipush 1
      // a9: anewarray 295
      // ac: dup
      // ad: bipush 0
      // ae: aload 7
      // b0: invokevirtual com/l7tech/server/service/resolution/ServiceResolver.getSimpleName ()Ljava/lang/String;
      // b3: aastore
      // b4: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // b9: aload 8
      // bb: astore 4
      // bd: goto e7
      // c0: iload 10
      // c2: ifne e0
      // c5: aload 1
      // c6: getstatic com/l7tech/gateway/common/audit/MessageProcessingMessages.SERVICE_CACHE_FAILED_EARLY Lcom/l7tech/gateway/common/audit/Messages$M;
      // c9: bipush 1
      // ca: anewarray 295
      // cd: dup
      // ce: bipush 0
      // cf: aload 7
      // d1: invokevirtual com/l7tech/server/service/resolution/ServiceResolver.getSimpleName ()Ljava/lang/String;
      // d4: aastore
      // d5: invokeinterface com/l7tech/gateway/common/audit/Audit.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V 3
      // da: aconst_null
      // db: areturn
      // dc: invokestatic com/l7tech/server/service/resolution/ServiceResolutionManager.a (Lcom/l7tech/server/service/resolution/ServiceResolutionException;)Lcom/l7tech/server/service/resolution/ServiceResolutionException;
      // df: athrow
      // e0: aload 8
      // e2: astore 4
      // e4: goto 0b
      // e7: aload 4
      // e9: areturn
      // try (11 -> 21): 22 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (13 -> 26): 26 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (33 -> 37): 37 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (39 -> 54): 54 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (62 -> 67): 68 com/l7tech/server/service/resolution/ServiceResolutionException
      // try (83 -> 97): 97 com/l7tech/server/service/resolution/ServiceResolutionException
   }

   private static boolean a(Message var0) throws ServiceResolutionException {
      try {
         return var0.isSoap();
      } catch (Exception var2) {
         throw new ServiceResolutionException(g[0], var2);
      }
   }

   private static Collection<PublishedService> a(Collection<PublishedService> var0) {
      var0 = new HashSet(var0);
      Iterator var1 = var0.iterator();

      while (var1.hasNext()) {
         PublishedService var2 = (PublishedService)var1.next();
         if (var2.isSoap() && !var2.isLaxResolution()) {
            var1.remove();
         }
      }

      return var0;
   }

   private void b() {
      String[] var4 = g;
      a.config(var4[1] + this.c + var4[7]);

      try {
         ResolutionConfiguration var1 = (ResolutionConfiguration)this.b.findByUniqueName(this.c);
         if (var1 != null) {
            for (ServiceResolver var3 : this.f) {
               var3.configure(var1);
            }
         }
      } catch (FindException var5) {
         a.log(Level.WARNING, g[4]);
      }
   }

   static {
      String[] var5 = new String[8];
      int var3 = 0;
      String var2 = "3g6,&K\n\u0012fw*/ZO\u0014d> /\u000e]\u000el#&/\\\n\u000bl$=+IOF`$n\u0019ak6\"4l;!+JC\bnw</]E\n\u007f2<jME\bo>)?\\K\u0012`8 j\t\u0006H\u007f6\"?K\nHl//)Ze\be.%#{%!8\u000eF\th3'$I\n\u0014l$!&XO\u0014)4!$HC\u0001|%/>GE\b'\nHl//)Ze\be.";
      int var4 = "3g6,&K\n\u0012fw*/ZO\u0014d> /\u000e]\u000el#&/\\\n\u000bl$=+IOF`$n\u0019ak6\"4l;!+JC\bnw</]E\n\u007f2<jME\bo>)?\\K\u0012`8 j\t\u0006H\u007f6\"?K\nHl//)Ze\be.%#{%!8\u000eF\th3'$I\n\u0014l$!&XO\u0014)4!$HC\u0001|%/>GE\b'\nHl//)Ze\be."
         .length();
      char var1 = '+';
      int var7 = -1;

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

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

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

                  var2 = "2\u0005LXE1\u0002;]";
                  var4 = "2\u0005LXE1\u0002;]".length();
                  var1 = 6;
                  var7 = -1;
            }

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

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

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

      return var10000;
   }

   private static String a(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 -> 91;
            case 1 -> 52;
            case 2 -> 106;
            case 3 -> 115;
            case 4 -> 119;
            case 5 -> 19;
            default -> 23;
         });
      }

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

   public interface ServiceResolutionListener {
      boolean notifyMessageBodyAccess(Message var1, Collection<PublishedService> var2);

      void notifyMessageValidation(Message var1, PublishedService var2);
   }
}
