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

com.imperva.shcf4j.helpers.NOPHttpResponse Maven / Gradle / Ivy

Go to download

The Simple HTTP Client Facade for Java (SHCF4J) serves as a simple facade or abstraction for various HTTP client frameworks (e.g. java.net.HttpURLConnection, Apache HttpClient, etc.) allowing the end user to plug in the desired HTTP client framework at deployment time.

The newest version!
package com.imperva.shcf4j.helpers;

import com.imperva.shcf4j.Header;
import com.imperva.shcf4j.HttpEntity;
import com.imperva.shcf4j.HttpResponse;
import com.imperva.shcf4j.StatusLine;

import java.util.Collections;
import java.util.List;

/**
 * NOPHttpResponse
 *
 *
 * 

* An empty {@link HttpResponse} that supposed to be returned from an {@link NOPSyncHttpClient} *

* * @author maxim.kirilov */ class NOPHttpResponse implements HttpResponse { static final HttpResponse INSTANCE = new NOPHttpResponse(); @Override public StatusLine getStatusLine() { return StatusLine.builder().build(); } @Override public HttpEntity getEntity() { return null; } @Override public boolean containsHeader(String name) { return false; } @Override public List getHeaders(String name) { return Collections.emptyList(); } @Override public List getAllHeaders() { return Collections.emptyList(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy