package com.l7tech.server.wsdm.subscription;

import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.server.message.PolicyEnforcementContext;
import java.net.MalformedURLException;
import java.util.concurrent.Callable;

class i implements Callable<Void> {
   final String val$message;
   final PolicyEnforcementContext[] val$context;
   final String val$notificationUrl;
   final String val$policyGuid;
   final AssertionStatus[] val$status;
   final SubscriptionNotifier this$0;
   private static final String[] a;

   i(SubscriptionNotifier var1, String var2, PolicyEnforcementContext[] var3, String var4, String var5, AssertionStatus[] var6) {
      this.this$0 = var1;
      this.val$message = var2;
      this.val$context = var3;
      this.val$notificationUrl = var4;
      this.val$policyGuid = var5;
      this.val$status = var6;
   }

   public Void call() throws Exception {
      // $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: new com/l7tech/message/Message
      // 003: dup
      // 004: aload 0
      // 005: getfield com/l7tech/server/wsdm/subscription/i.val$message Ljava/lang/String;
      // 008: invokestatic com/l7tech/common/io/XmlUtil.stringAsDocument (Ljava/lang/String;)Lorg/w3c/dom/Document;
      // 00b: invokespecial com/l7tech/message/Message.<init> (Lorg/w3c/dom/Document;)V
      // 00e: astore 1
      // 00f: aload 1
      // 010: new com/l7tech/message/HttpRequestKnobAdapter
      // 013: dup
      // 014: aconst_null
      // 015: invokespecial com/l7tech/message/HttpRequestKnobAdapter.<init> (Ljava/lang/String;)V
      // 018: invokevirtual com/l7tech/message/Message.attachHttpRequestKnob (Lcom/l7tech/message/HttpRequestKnob;)V
      // 01b: aload 0
      // 01c: getfield com/l7tech/server/wsdm/subscription/i.val$context [Lcom/l7tech/server/message/PolicyEnforcementContext;
      // 01f: bipush 0
      // 020: aload 1
      // 021: aconst_null
      // 022: bipush 0
      // 023: invokestatic com/l7tech/server/message/PolicyEnforcementContextFactory.createPolicyEnforcementContext (Lcom/l7tech/message/Message;Lcom/l7tech/message/Message;Z)Lcom/l7tech/server/message/PolicyEnforcementContext;
      // 026: aastore
      // 027: aload 0
      // 028: getfield com/l7tech/server/wsdm/subscription/i.val$context [Lcom/l7tech/server/message/PolicyEnforcementContext;
      // 02b: bipush 0
      // 02c: aaload
      // 02d: getstatic java/util/logging/Level.INFO Ljava/util/logging/Level;
      // 030: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setAuditLevel (Ljava/util/logging/Level;)V 2
      // 035: new com/l7tech/gateway/common/service/PublishedService
      // 038: dup
      // 039: invokespecial com/l7tech/gateway/common/service/PublishedService.<init> ()V
      // 03c: astore 2
      // 03d: aload 2
      // 03e: getstatic com/l7tech/server/wsdm/subscription/i.a [Ljava/lang/String;
      // 041: astore 7
      // 043: aload 7
      // 045: bipush 0
      // 046: aaload
      // 047: invokevirtual com/l7tech/gateway/common/service/PublishedService.setName (Ljava/lang/String;)V
      // 04a: aload 2
      // 04b: bipush 1
      // 04c: invokevirtual com/l7tech/gateway/common/service/PublishedService.setSoap (Z)V
      // 04f: aload 0
      // 050: getfield com/l7tech/server/wsdm/subscription/i.val$context [Lcom/l7tech/server/message/PolicyEnforcementContext;
      // 053: bipush 0
      // 054: aaload
      // 055: aload 2
      // 056: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setService (Lcom/l7tech/gateway/common/service/PublishedService;)V 2
      // 05b: aload 0
      // 05c: getfield com/l7tech/server/wsdm/subscription/i.this$0 Lcom/l7tech/server/wsdm/subscription/SubscriptionNotifier;
      // 05f: getfield com/l7tech/server/wsdm/subscription/SubscriptionNotifier.f Lcom/l7tech/server/audit/Auditor;
      // 062: getstatic com/l7tech/gateway/common/audit/ServiceMessages.ESM_NOTIFY_NOTIFICATION Lcom/l7tech/gateway/common/audit/Messages$M;
      // 065: bipush 1
      // 066: anewarray 48
      // 069: dup
      // 06a: bipush 0
      // 06b: aload 0
      // 06c: getfield com/l7tech/server/wsdm/subscription/i.val$notificationUrl Ljava/lang/String;
      // 06f: aastore
      // 070: invokevirtual com/l7tech/server/audit/Auditor.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 073: aconst_null
      // 074: astore 3
      // 075: new java/net/URL
      // 078: dup
      // 079: aload 0
      // 07a: getfield com/l7tech/server/wsdm/subscription/i.val$notificationUrl Ljava/lang/String;
      // 07d: invokespecial java/net/URL.<init> (Ljava/lang/String;)V
      // 080: astore 3
      // 081: goto 09e
      // 084: astore 4
      // 086: aload 0
      // 087: getfield com/l7tech/server/wsdm/subscription/i.this$0 Lcom/l7tech/server/wsdm/subscription/SubscriptionNotifier;
      // 08a: getfield com/l7tech/server/wsdm/subscription/SubscriptionNotifier.f Lcom/l7tech/server/audit/Auditor;
      // 08d: getstatic com/l7tech/gateway/common/audit/ServiceMessages.ESM_NOTIFY_INVALID_URL Lcom/l7tech/gateway/common/audit/Messages$M;
      // 090: bipush 1
      // 091: anewarray 48
      // 094: dup
      // 095: bipush 0
      // 096: aload 0
      // 097: getfield com/l7tech/server/wsdm/subscription/i.val$notificationUrl Ljava/lang/String;
      // 09a: aastore
      // 09b: invokevirtual com/l7tech/server/audit/Auditor.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 09e: aload 3
      // 09f: ifnull 1e0
      // 0a2: aload 0
      // 0a3: getfield com/l7tech/server/wsdm/subscription/i.val$policyGuid Ljava/lang/String;
      // 0a6: ifnonnull 100
      // 0a9: goto 0b0
      // 0ac: invokestatic com/l7tech/server/wsdm/subscription/i.a (Ljava/net/MalformedURLException;)Ljava/net/MalformedURLException;
      // 0af: athrow
      // 0b0: aload 0
      // 0b1: getfield com/l7tech/server/wsdm/subscription/i.this$0 Lcom/l7tech/server/wsdm/subscription/SubscriptionNotifier;
      // 0b4: getfield com/l7tech/server/wsdm/subscription/SubscriptionNotifier.f Lcom/l7tech/server/audit/Auditor;
      // 0b7: getstatic com/l7tech/gateway/common/audit/ServiceMessages.ESM_NOTIFY_NO_POLICY Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0ba: bipush 1
      // 0bb: anewarray 48
      // 0be: dup
      // 0bf: bipush 0
      // 0c0: aload 0
      // 0c1: getfield com/l7tech/server/wsdm/subscription/i.val$notificationUrl Ljava/lang/String;
      // 0c4: aastore
      // 0c5: invokevirtual com/l7tech/server/audit/Auditor.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 0c8: aload 0
      // 0c9: getfield com/l7tech/server/wsdm/subscription/i.this$0 Lcom/l7tech/server/wsdm/subscription/SubscriptionNotifier;
      // 0cc: aload 0
      // 0cd: getfield com/l7tech/server/wsdm/subscription/i.val$context [Lcom/l7tech/server/message/PolicyEnforcementContext;
      // 0d0: bipush 0
      // 0d1: aaload
      // 0d2: aload 3
      // 0d3: aload 0
      // 0d4: getfield com/l7tech/server/wsdm/subscription/i.val$message Ljava/lang/String;
      // 0d7: invokevirtual com/l7tech/server/wsdm/subscription/SubscriptionNotifier.a (Lcom/l7tech/server/message/PolicyEnforcementContext;Ljava/net/URL;Ljava/lang/String;)Z
      // 0da: ifeq 0f4
      // 0dd: goto 0e4
      // 0e0: invokestatic com/l7tech/server/wsdm/subscription/i.a (Ljava/net/MalformedURLException;)Ljava/net/MalformedURLException;
      // 0e3: athrow
      // 0e4: aload 0
      // 0e5: getfield com/l7tech/server/wsdm/subscription/i.val$status [Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0e8: bipush 0
      // 0e9: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0ec: aastore
      // 0ed: goto 1e0
      // 0f0: invokestatic com/l7tech/server/wsdm/subscription/i.a (Ljava/net/MalformedURLException;)Ljava/net/MalformedURLException;
      // 0f3: athrow
      // 0f4: aload 0
      // 0f5: getfield com/l7tech/server/wsdm/subscription/i.val$status [Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0f8: bipush 0
      // 0f9: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0fc: aastore
      // 0fd: goto 1e0
      // 100: aconst_null
      // 101: astore 4
      // 103: aload 0
      // 104: getfield com/l7tech/server/wsdm/subscription/i.this$0 Lcom/l7tech/server/wsdm/subscription/SubscriptionNotifier;
      // 107: getfield com/l7tech/server/wsdm/subscription/SubscriptionNotifier.policyCache Lcom/l7tech/server/policy/PolicyCache;
      // 10a: aload 0
      // 10b: getfield com/l7tech/server/wsdm/subscription/i.val$policyGuid Ljava/lang/String;
      // 10e: invokeinterface com/l7tech/server/policy/PolicyCache.getServerPolicy (Ljava/lang/String;)Lcom/l7tech/server/policy/ServerPolicyHandle; 2
      // 113: astore 4
      // 115: aload 4
      // 117: ifnonnull 149
      // 11a: aload 0
      // 11b: getfield com/l7tech/server/wsdm/subscription/i.this$0 Lcom/l7tech/server/wsdm/subscription/SubscriptionNotifier;
      // 11e: getfield com/l7tech/server/wsdm/subscription/SubscriptionNotifier.f Lcom/l7tech/server/audit/Auditor;
      // 121: getstatic com/l7tech/gateway/common/audit/ServiceMessages.ESM_NOTIFY_INVALID_POLICY Lcom/l7tech/gateway/common/audit/Messages$M;
      // 124: bipush 2
      // 125: anewarray 48
      // 128: dup
      // 129: bipush 0
      // 12a: aload 0
      // 12b: getfield com/l7tech/server/wsdm/subscription/i.val$notificationUrl Ljava/lang/String;
      // 12e: aastore
      // 12f: dup
      // 130: bipush 1
      // 131: aload 0
      // 132: getfield com/l7tech/server/wsdm/subscription/i.val$policyGuid Ljava/lang/String;
      // 135: aastore
      // 136: invokevirtual com/l7tech/server/audit/Auditor.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 139: aload 0
      // 13a: getfield com/l7tech/server/wsdm/subscription/i.val$status [Lcom/l7tech/policy/assertion/AssertionStatus;
      // 13d: bipush 0
      // 13e: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 141: aastore
      // 142: goto 1ce
      // 145: invokestatic com/l7tech/server/wsdm/subscription/i.a (Ljava/net/MalformedURLException;)Ljava/net/MalformedURLException;
      // 148: athrow
      // 149: aload 0
      // 14a: getfield com/l7tech/server/wsdm/subscription/i.val$context [Lcom/l7tech/server/message/PolicyEnforcementContext;
      // 14d: bipush 0
      // 14e: aaload
      // 14f: getstatic com/l7tech/server/wsdm/subscription/i.a [Ljava/lang/String;
      // 152: astore 7
      // 154: aload 7
      // 156: bipush 1
      // 157: aaload
      // 158: aload 0
      // 159: getfield com/l7tech/server/wsdm/subscription/i.val$notificationUrl Ljava/lang/String;
      // 15c: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setVariable (Ljava/lang/String;Ljava/lang/Object;)V 3
      // 161: aload 0
      // 162: getfield com/l7tech/server/wsdm/subscription/i.val$status [Lcom/l7tech/policy/assertion/AssertionStatus;
      // 165: bipush 0
      // 166: aload 4
      // 168: aload 0
      // 169: getfield com/l7tech/server/wsdm/subscription/i.val$context [Lcom/l7tech/server/message/PolicyEnforcementContext;
      // 16c: bipush 0
      // 16d: aaload
      // 16e: invokevirtual com/l7tech/server/policy/ServerPolicyHandle.checkRequest (Lcom/l7tech/server/message/PolicyEnforcementContext;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 171: aastore
      // 172: goto 1ce
      // 175: astore 5
      // 177: aload 0
      // 178: getfield com/l7tech/server/wsdm/subscription/i.this$0 Lcom/l7tech/server/wsdm/subscription/SubscriptionNotifier;
      // 17b: getfield com/l7tech/server/wsdm/subscription/SubscriptionNotifier.f Lcom/l7tech/server/audit/Auditor;
      // 17e: getstatic com/l7tech/gateway/common/audit/ServiceMessages.EXCEPTION_WARNING_WITH_MORE_INFO Lcom/l7tech/gateway/common/audit/Messages$M;
      // 181: bipush 1
      // 182: anewarray 48
      // 185: dup
      // 186: bipush 0
      // 187: aload 5
      // 189: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 18c: getstatic com/l7tech/server/wsdm/subscription/i.a [Ljava/lang/String;
      // 18f: bipush 2
      // 190: aaload
      // 191: swap
      // 192: 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" ]
      // 197: aastore
      // 198: aload 5
      // 19a: invokevirtual com/l7tech/server/audit/Auditor.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 19d: goto 1ce
      // 1a0: astore 5
      // 1a2: aload 0
      // 1a3: getfield com/l7tech/server/wsdm/subscription/i.this$0 Lcom/l7tech/server/wsdm/subscription/SubscriptionNotifier;
      // 1a6: getfield com/l7tech/server/wsdm/subscription/SubscriptionNotifier.f Lcom/l7tech/server/audit/Auditor;
      // 1a9: getstatic com/l7tech/gateway/common/audit/ServiceMessages.ESM_NOTIFY_IO_ERROR Lcom/l7tech/gateway/common/audit/Messages$M;
      // 1ac: bipush 3
      // 1ad: anewarray 48
      // 1b0: dup
      // 1b1: bipush 0
      // 1b2: aload 0
      // 1b3: getfield com/l7tech/server/wsdm/subscription/i.val$notificationUrl Ljava/lang/String;
      // 1b6: aastore
      // 1b7: dup
      // 1b8: bipush 1
      // 1b9: aload 0
      // 1ba: getfield com/l7tech/server/wsdm/subscription/i.val$policyGuid Ljava/lang/String;
      // 1bd: aastore
      // 1be: dup
      // 1bf: bipush 2
      // 1c0: aload 5
      // 1c2: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 1c5: aastore
      // 1c6: aload 5
      // 1c8: invokestatic com/l7tech/util/ExceptionUtils.getDebugException (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 1cb: invokevirtual com/l7tech/server/audit/Auditor.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;Ljava/lang/Throwable;)V
      // 1ce: aload 4
      // 1d0: invokestatic com/l7tech/util/ResourceUtils.closeQuietly (Ljava/io/Closeable;)V
      // 1d3: goto 1e0
      // 1d6: astore 6
      // 1d8: aload 4
      // 1da: invokestatic com/l7tech/util/ResourceUtils.closeQuietly (Ljava/io/Closeable;)V
      // 1dd: aload 6
      // 1df: athrow
      // 1e0: aconst_null
      // 1e1: areturn
      // try (61 -> 67): 68 java/net/MalformedURLException
      // try (138 -> 163): 163 java/net/MalformedURLException
      // try (89 -> 121): 121 java/net/MalformedURLException
      // try (83 -> 112): 113 java/net/MalformedURLException
      // try (81 -> 86): 87 java/net/MalformedURLException
      // try (177 -> 187): 188 com/l7tech/policy/assertion/PolicyAssertionException
      // try (177 -> 187): 208 java/io/IOException
      // try (131 -> 233): 236 null
      // try (236 -> 237): 236 null
   }

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

   static {
      String[] var5 = new String[3];
      int var3 = 0;
      String var2 = "^u\u0016qA2[r@22n)FtH{\u0002j/YrE>qT\u0014AoC)?n1r\u0012~U6\u001f`)F}O80{4@us)=\u0018^u\u0016qA2[r@22n)FtH{\u0014}/@i\u001c{";
      int var4 = "^u\u0016qA2[r@22n)FtH{\u0002j/YrE>qT\u0014AoC)?n1r\u0012~U6\u001f`)F}O80{4@us)=\u0018^u\u0016qA2[r@22n)FtH{\u0014}/@i\u001c{".length();
      char var1 = '#';
      int var0 = -1;

      while (true) {
         String var10002 = a(94, a(var2.substring(++var0, var0 + var1)));
         byte var10001 = -1;
         var5[var3++] = var10002;
         if ((var0 += var1) >= var4) {
            a = var5;
            return;
         }

         var1 = var2.charAt(var0);
      }
   }

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

      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 -> 69;
            case 1 -> 120;
            case 2 -> 5;
            case 3 -> 15;
            case 4 -> 81;
            case 5 -> 3;
            default -> 113;
         });
      }

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