Class ProxyFactory
java.lang.Object
com.aispect.core.engine.bootstrap.proxy.ProxyFactory
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TcreateProxy(T target, Class<T> interfaceClass, AiOperations aiOperations) Create a proxy instance.
-
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 classaiOperations- AI Operation interface instance- Returns:
- generated JDK Dynamic proxy instance
- Throws:
AiScanException- If the component scan during the startup phase finds configuration errors
-