// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepInvocationCauseException.java
// public class LepInvocationCauseException extends Exception {
// 
//     /**
//      * Serial UID.
//      */
//     private static final long serialVersionUID = -6216272704551111089L;
// 
//     /**
//      * This field holds the cause if the
//      * LepInvocationCauseException(Throwable lepCause) constructor was
//      * used to instantiate the object.
//      */
//     private Exception lepCause;
// 
//     /**
//      * Constructs an {@code LepInvocationCauseException} with
//      * {@code null} as the target exception.
//      */
//     private LepInvocationCauseException() {
//         super((Exception) null);  // Disallow initCause
//     }
// 
//     /**
//      * Constructs a LepInvocationCauseException with a LEP exception.
//      *
//      * @param lepCause the LEP exception
//      */
//     public LepInvocationCauseException(Exception lepCause) {
//         super((Exception) null);  // Disallow initCause
//         this.lepCause = lepCause;
//     }
// 
//     /**
//      * Constructs a InvocationTargetException with a target exception
//      * and a detail message.
//      *
//      * @param lepCause the LEP exception
//      * @param msg      the detail message
//      */
//     public LepInvocationCauseException(Exception lepCause, String msg) {
//         super(msg, null);  // Disallow initCause
//         this.lepCause = lepCause;
//     }
// 
//     /**
//      * Returns the cause of this exception (the LEP thrown cause exception,
//      * which may be {@code null}).
//      *
//      * @return the cause of this exception.
//      */
//     @Override
//     public Exception getCause() {
//         return lepCause;
//     }
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepManagerService.java
// public interface LepManagerService extends ContextsHolder {
// 
//     ExtensionService getExtensionService();
// 
//     LepResourceService getResourceService();
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepMethod.java
// public interface LepMethod {
// 
//     Object getTarget();
// 
//     MethodSignature getMethodSignature();
// 
//     Object[] getMethodArgValues();
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepResourceKey.java
// public interface LepResourceKey {
// 
//     String getId();
// 
//     Version getVersion();
// 
// }


import com.icthh.xm.lep.api.LepInvocationCauseException;
import com.icthh.xm.lep.api.LepManagerService;
import com.icthh.xm.lep.api.LepMethod;
import com.icthh.xm.lep.api.LepResourceKey;
import java.util.function.Supplier;
package com.icthh.xm.lep.groovy;



/**
 * The {@link ExecutionStrategy} interface.
 */
public interface ExecutionStrategy<E, K extends LepResourceKey> {

    /**
     * Executes LEP resource using some executor.
     *
     * @param resourceKey              LEP resource key
     * @param method                   LEP method info data
     * @param managerService           LEP manager service
     * @param resourceExecutorSupplier LEP resource executor supplier function
     * @return LEP method result
     * @throws LepInvocationCauseException when LEP invocation resource throws exception
     */
    Object executeLepResource(K resourceKey,
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepInvocationCauseException.java
// public class LepInvocationCauseException extends Exception {
// 
//     /**
//      * Serial UID.
//      */
//     private static final long serialVersionUID = -6216272704551111089L;
// 
//     /**
//      * This field holds the cause if the
//      * LepInvocationCauseException(Throwable lepCause) constructor was
//      * used to instantiate the object.
//      */
//     private Exception lepCause;
// 
//     /**
//      * Constructs an {@code LepInvocationCauseException} with
//      * {@code null} as the target exception.
//      */
//     private LepInvocationCauseException() {
//         super((Exception) null);  // Disallow initCause
//     }
// 
//     /**
//      * Constructs a LepInvocationCauseException with a LEP exception.
//      *
//      * @param lepCause the LEP exception
//      */
//     public LepInvocationCauseException(Exception lepCause) {
//         super((Exception) null);  // Disallow initCause
//         this.lepCause = lepCause;
//     }
// 
//     /**
//      * Constructs a InvocationTargetException with a target exception
//      * and a detail message.
//      *
//      * @param lepCause the LEP exception
//      * @param msg      the detail message
//      */
//     public LepInvocationCauseException(Exception lepCause, String msg) {
//         super(msg, null);  // Disallow initCause
//         this.lepCause = lepCause;
//     }
// 
//     /**
//      * Returns the cause of this exception (the LEP thrown cause exception,
//      * which may be {@code null}).
//      *
//      * @return the cause of this exception.
//      */
//     @Override
//     public Exception getCause() {
//         return lepCause;
//     }
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepManagerService.java
// public interface LepManagerService extends ContextsHolder {
// 
//     ExtensionService getExtensionService();
// 
//     LepResourceService getResourceService();
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepMethod.java
// public interface LepMethod {
// 
//     Object getTarget();
// 
//     MethodSignature getMethodSignature();
// 
//     Object[] getMethodArgValues();
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepResourceKey.java
// public interface LepResourceKey {
// 
//     String getId();
// 
//     Version getVersion();
// 
// }


// Path: xm-lep-groovy/src/main/java/com/icthh/xm/lep/groovy/ExecutionStrategy.java
import com.icthh.xm.lep.api.LepInvocationCauseException;
import com.icthh.xm.lep.api.LepManagerService;
import com.icthh.xm.lep.api.LepMethod;
import com.icthh.xm.lep.api.LepResourceKey;
import java.util.function.Supplier;

package com.icthh.xm.lep.groovy;



/**
 * The {@link ExecutionStrategy} interface.
 */
public interface ExecutionStrategy<E, K extends LepResourceKey> {

    /**
     * Executes LEP resource using some executor.
     *
     * @param resourceKey              LEP resource key
     * @param method                   LEP method info data
     * @param managerService           LEP manager service
     * @param resourceExecutorSupplier LEP resource executor supplier function
     * @return LEP method result
     * @throws LepInvocationCauseException when LEP invocation resource throws exception
     */
    Object executeLepResource(K resourceKey,
                              LepMethod method,