public class AppSyncSubscriptionInterceptor extends java.lang.Object implements ApolloInterceptor
ApolloInterceptor.CallBack, ApolloInterceptor.FetchSourceType, ApolloInterceptor.InterceptorRequest, ApolloInterceptor.InterceptorResponse| Constructor and Description |
|---|
AppSyncSubscriptionInterceptor(SubscriptionManager subscriptionManager,
ResponseNormalizer<java.util.Map<java.lang.String,java.lang.Object>> mapResponseNormalizer) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes of the resources which are no longer required.
|
void |
interceptAsync(ApolloInterceptor.InterceptorRequest request,
ApolloInterceptorChain chain,
java.util.concurrent.Executor dispatcher,
ApolloInterceptor.CallBack callBack)
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.
|
public AppSyncSubscriptionInterceptor(SubscriptionManager subscriptionManager, ResponseNormalizer<java.util.Map<java.lang.String,java.lang.Object>> mapResponseNormalizer)
public void interceptAsync(@Nonnull
ApolloInterceptor.InterceptorRequest request,
@Nonnull
ApolloInterceptorChain chain,
@Nonnull
java.util.concurrent.Executor dispatcher,
@Nonnull
ApolloInterceptor.CallBack callBack)
ApolloInterceptorinterceptAsync in interface ApolloInterceptorrequest - outgoing request object.chain - the ApolloInterceptorChain object containing the next set of interceptors.dispatcher - the Executor which dispatches the non blocking operations on the request/response.callBack - the Callback which will handle the interceptor's response or failure exception.public void dispose()
ApolloInterceptorA use case for this method call would be when an GraphQLCall needs to be
cancelled and resources need to be disposed of.
dispose in interface ApolloInterceptor