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:
Oleg Kalnichevski 2006-05-14 21:26:00 +00:00
parent 020ec5017f
commit 5fb29270eb
1 changed files with 42 additions and 0 deletions

View 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 {
}
}