package com.l7tech.server.module;

import com.l7tech.gateway.common.module.ServerModuleFile;
import com.l7tech.objectmodel.FindException;
import com.l7tech.util.Eithers;
import com.l7tech.util.Pair;
import com.l7tech.util.Eithers.E2;
import com.l7tech.util.Functions.Nullary;
import java.io.InputStream;

class i implements Nullary<E2<FindException, ServerModuleFileListener.ModuleMissingContentsException, Pair<InputStream, String>>> {
   final ServerModuleFile val$module;
   final ServerModuleFileListener this$0;

   i(ServerModuleFileListener var1, ServerModuleFile var2) {
      this.this$0 = var1;
      this.val$module = var2;
   }

   public E2<FindException, ServerModuleFileListener.ModuleMissingContentsException, Pair<InputStream, String>> call() {
      try {
         Pair var1 = this.this$0.serverModuleFileManager.getModuleBytesAsStreamWithSignature(this.val$module.getGoid());
         return var1 != null ? Eithers.right2(var1) : Eithers.left2_2(new ServerModuleFileListener.ModuleMissingContentsException());
      } catch (FindException var2) {
         return Eithers.left2_1(var2);
      }
   }
}
