Class GraphQLRepositoryInvocationHandler<T>
java.lang.Object
com.graphql_java_generator.client.graphqlrepository.GraphQLRepositoryInvocationHandler<T>
- All Implemented Interfaces:
InvocationHandler
This class is responsible to execute the method call to
GraphQLRepository.- Author:
- etienne-sf
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> GraphQLRepositoryInvocationHandler<T>Starting from java 25, there is a warning about a "possible 'this' escape before subclass is fully initialized".Invocation of theInvocationHandler.
-
Method Details
-
factory
public static <T> GraphQLRepositoryInvocationHandler<T> factory(Class<T> repositoryInterface, org.springframework.context.ApplicationContext ctx) throws GraphQLRequestPreparationException Starting from java 25, there is a warning about a "possible 'this' escape before subclass is fully initialized". This implies that the constructor may not call thecreateProxyInstance()method.
To override this limitation, the constructor is now private, and this factory creates the instance, then call thecreateProxyInstance()method.- Returns:
- Throws:
GraphQLRequestPreparationException
-
invoke
Invocation of theInvocationHandler. This method is called when a method of the T interface is called. This call is delegated to the relevant Query/Mutation/Subscription executor.
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-