updated to new timeout methods in HttpConnection

git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@510131 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Roland Weber 2007-02-21 18:12:26 +00:00
parent 804d75f23c
commit 8055c100ca
3 changed files with 16 additions and 16 deletions

View File

@ -133,6 +133,20 @@ public abstract class AbstractClientConnectionAdapter
}
// non-javadoc, see interface HttpConnection
public void setSocketTimeout(int timeout) {
assertWrappedConn();
wrappedConnection.setSocketTimeout(timeout);
}
// non-javadoc, see interface HttpConnection
public int getSocketTimeout() {
assertWrappedConn();
return wrappedConnection.getSocketTimeout();
}
// non-javadoc, see interface HttpClientConnection
public void flush()
throws IOException {

View File

@ -1408,20 +1408,6 @@ public class ThreadSafeClientConnManager
}
}
/*
//===========================
// HttpHostConnection methods
//===========================
public void setSocketTimeout(int timeout) throws SocketException {
if (hasConnection()) {
wrappedConnection.setSocketTimeout(timeout);
} else {
// do nothing
}
}
*/
} // class HttpConnectionAdapter
} // class ThreadSafeClientConnManager

View File

@ -55,7 +55,7 @@ public class HttpConnectionMockup implements HttpConnection {
this.open = false;
}
public int getSocketTimeout() throws IOException {
public int getSocketTimeout() {
return 0;
}
@ -67,6 +67,6 @@ public class HttpConnectionMockup implements HttpConnection {
return false;
}
public void setSocketTimeout(int timeout) throws IOException {
public void setSocketTimeout(int timeout) {
}
}