Class RealApolloInterceptorChain
- java.lang.Object
-
- com.apollographql.apollo.internal.interceptor.RealApolloInterceptorChain
-
- All Implemented Interfaces:
ApolloInterceptorChain
public final class RealApolloInterceptorChain extends java.lang.Object implements ApolloInterceptorChain
RealApolloInterceptorChain is responsible for building the entire interceptor chain. Based on the task at hand, the chain may contain interceptors which fetch responses from the normalized cache, make network calls to fetch data if needed or parse the http responses to inflate models.
-
-
Constructor Summary
Constructors Constructor Description RealApolloInterceptorChain(java.util.List<ApolloInterceptor> interceptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Disposes of the resources which are no longer required.voidproceedAsync(ApolloInterceptor.InterceptorRequest request, java.util.concurrent.Executor dispatcher, ApolloInterceptor.CallBack callBack)Passes the control over to the nextApolloInterceptorin the responsibility chain and immediately exits as this is a non blocking call.
-
-
-
Constructor Detail
-
RealApolloInterceptorChain
public RealApolloInterceptorChain(@NotNull java.util.List<ApolloInterceptor> interceptors)
-
-
Method Detail
-
proceedAsync
public void proceedAsync(@NotNull ApolloInterceptor.InterceptorRequest request, @NotNull java.util.concurrent.Executor dispatcher, @NotNull ApolloInterceptor.CallBack callBack)Description copied from interface:ApolloInterceptorChainPasses the control over to the nextApolloInterceptorin the responsibility chain and immediately exits as this is a non blocking call. In order to receive the results back, pass in a callback which will handle the received response or error.- Specified by:
proceedAsyncin interfaceApolloInterceptorChain- Parameters:
request- outgoing request object.dispatcher- theExecutorwhich dispatches the calls asynchronously.callBack- the callback which will handle the response or a failure exception.
-
dispose
public void dispose()
Description copied from interface:ApolloInterceptorChainDisposes of the resources which are no longer required.- Specified by:
disposein interfaceApolloInterceptorChain
-
-