Class ProxyFactory

java.lang.Object
com.aispect.core.engine.bootstrap.proxy.ProxyFactory

public class ProxyFactory extends Object
AI Agent factory class, which belongs tostartup phase (Bootstrap)Responsibilities.

use JDK The dynamic proxy mechanism generates proxy instances for interfaces modified by annotations. All method calls on the proxy instance will be AgentInterceptor Intercept and route to the corresponding engine for execution.

  • Constructor Details

    • ProxyFactory

      public ProxyFactory()
  • Method Details

    • createProxy

      public static <T> T createProxy(T target, Class<T> interfaceClass, AiOperations aiOperations) throws AiScanException
      Create a proxy instance.
      Type Parameters:
      T - Interface type
      Parameters:
      target - Target object (an instance of the interface implementation class)
      interfaceClass - Proxied interface class
      aiOperations - AI Operation interface instance
      Returns:
      generated JDK Dynamic proxy instance
      Throws:
      AiScanException - If the component scan during the startup phase finds configuration errors