mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-09 03:25:28 +00:00
Added HttpConnectionMockup class
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@406435 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
020ec5017f
commit
5fb29270eb
42
src/test/org/apache/http/mockup/HttpConnectionMockup.java
Normal file
42
src/test/org/apache/http/mockup/HttpConnectionMockup.java
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package org.apache.http.mockup;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import org.apache.http.HttpConnection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link HttpConnection} mockup implementation.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
|
||||||
|
*/
|
||||||
|
public class HttpConnectionMockup implements HttpConnection {
|
||||||
|
|
||||||
|
private boolean open = true;
|
||||||
|
|
||||||
|
public HttpConnectionMockup() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close() throws IOException {
|
||||||
|
this.open = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void shutdown() throws IOException {
|
||||||
|
this.open = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSocketTimeout() throws IOException {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOpen() {
|
||||||
|
return this.open;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isStale() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSocketTimeout(int timeout) throws IOException {
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user