![JAR search and dependency download from the Maven repository](/logo.png)
com.google.maps.clients.HttpRequestInitializerPipeline Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mapsengine-api-java-wrapper Show documentation
Show all versions of mapsengine-api-java-wrapper Show documentation
Provides some extra sugar for the machine-generated Java library for Google Maps Engine. https://developers.google.com/api-client-library/java/apis/mapsengine/v1
package com.google.maps.clients;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestInitializer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
/**
* Provides a mechanism for running multiple HttpRequestInitializers in sequence.
*
* @author [email protected] (Mark McDonald)
*/
public class HttpRequestInitializerPipeline implements HttpRequestInitializer {
protected final List initializers;
/**
* Creates a new pipeline from the provided list of initializers.
* @param existing The existing initializers are cloned, exactly like a new List<>(someList)
*/
public HttpRequestInitializerPipeline(List existing) {
initializers = new ArrayList(existing);
}
/**
* Creates a new pipeline from the provided list of initializers.
* @param initializers The existing initializers to be used in the order specified.
*/
public HttpRequestInitializerPipeline(HttpRequestInitializer... initializers) {
this.initializers = Arrays.asList(initializers);
}
@Override
public void initialize(HttpRequest httpRequest) throws IOException {
for (HttpRequestInitializer initializer : initializers) {
initializer.initialize(httpRequest);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy