All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mastercard.developer.interceptors.HttpExecuteInterceptorChain Maven / Gradle / Ivy

There is a newer version: 1.8.3
Show newest version
package com.mastercard.developer.interceptors;

import com.google.api.client.http.HttpExecuteInterceptor;
import com.google.api.client.http.HttpRequest;

import java.io.IOException;
import java.util.List;

/**
 * Helper to chain multiple Google Client API request interceptors.
 */
public class HttpExecuteInterceptorChain implements HttpExecuteInterceptor {

    private final List requestInterceptors;

    public HttpExecuteInterceptorChain(List requestInterceptors) {
        this.requestInterceptors = requestInterceptors;
    }

    @Override
    public void intercept(HttpRequest request) throws IOException {
        for (HttpExecuteInterceptor interceptor: requestInterceptors) {
            interceptor.intercept(request);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy