com.mastercard.developer.interceptors.HttpExecuteInterceptorChain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-encryption Show documentation
Show all versions of client-encryption Show documentation
Library for Mastercard API compliant payload encryption/decryption
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);
}
}
}