com.apollographql.apollo3.runtime.java.interceptor.ApolloInterceptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-runtime-java Show documentation
Show all versions of apollo-runtime-java Show documentation
Apollo GraphQL runtime for Java
package com.apollographql.apollo3.runtime.java.interceptor;
import com.apollographql.apollo3.api.ApolloRequest;
import com.apollographql.apollo3.api.Operation;
import com.apollographql.apollo3.runtime.java.ApolloCallback;
import org.jetbrains.annotations.NotNull;
/**
* ApolloInterceptor is responsible for observing and modifying the requests going out and the corresponding responses coming back in.
* Typical responsibilities include adding or removing headers from the request or response objects, transforming the returned responses
* from one type to another, etc.
*/
public interface ApolloInterceptor {
/**
* Intercepts the outgoing request and performs non-blocking operations on the request or the response returned by the next set of
* interceptors in the chain.
*
* @param request outgoing request object.
* @param chain the ApolloInterceptorChain object containing the next set of interceptors.
* @param callback the Callback which will handle the interceptor's response or failure exception.
*/
void intercept(@NotNull ApolloRequest request, @NotNull ApolloInterceptorChain chain, @NotNull ApolloCallback callback);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy