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

org.frameworkset.spi.remote.http.WrapHttpClient Maven / Gradle / Ivy

package org.frameworkset.spi.remote.http;
/**
 * Copyright 2008 biaoping.yin
 * 

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *

* http://www.apache.org/licenses/LICENSE-2.0 *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.apache.http.HttpHost; import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; import java.io.IOException; /** *

Description:

*

*

Copyright (c) 2018

* @Date 2019/11/13 10:16 * @author biaoping.yin * @version 1.0 */ public class WrapHttpClient implements HttpClient{ private HttpClient innerHttpClient; public WrapHttpClient(HttpClient innerHttpClient) { this.innerHttpClient = innerHttpClient; } @Override public HttpParams getParams() { return innerHttpClient.getParams(); } @Override public ClientConnectionManager getConnectionManager() { return innerHttpClient.getConnectionManager(); } @Override public HttpResponse execute(HttpUriRequest request) throws IOException, ClientProtocolException { return innerHttpClient.execute( request); } @Override public HttpResponse execute(HttpUriRequest request, HttpContext context) throws IOException, ClientProtocolException { return innerHttpClient.execute( request,context); } @Override public HttpResponse execute(HttpHost target, HttpRequest request) throws IOException, ClientProtocolException { return innerHttpClient.execute( target, request); } @Override public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) throws IOException, ClientProtocolException { return innerHttpClient.execute( target, request, context); } @Override public T execute(HttpUriRequest request, ResponseHandler responseHandler) throws IOException, ClientProtocolException { return innerHttpClient.execute( request, responseHandler ); } @Override public T execute(HttpUriRequest request, ResponseHandler responseHandler, HttpContext context) throws IOException, ClientProtocolException { return innerHttpClient.execute( request, responseHandler, context); } @Override public T execute(HttpHost target, HttpRequest request, ResponseHandler responseHandler) throws IOException, ClientProtocolException { return innerHttpClient.execute( target, request, responseHandler); } @Override public T execute(HttpHost target, HttpRequest request, ResponseHandler responseHandler, HttpContext context) throws IOException, ClientProtocolException { return innerHttpClient.execute( target, request, responseHandler, context); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy