diff --git a/src/java/org/apache/http/impl/conn/AbstractClientConnectionAdapter.java b/src/java/org/apache/http/impl/conn/AbstractClientConnectionAdapter.java index 9bc23f9f7..228379fc2 100644 --- a/src/java/org/apache/http/impl/conn/AbstractClientConnectionAdapter.java +++ b/src/java/org/apache/http/impl/conn/AbstractClientConnectionAdapter.java @@ -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 { diff --git a/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java b/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java index e6dcf2647..6a94da1a2 100644 --- a/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java +++ b/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java @@ -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 diff --git a/src/test/org/apache/http/mockup/HttpConnectionMockup.java b/src/test/org/apache/http/mockup/HttpConnectionMockup.java index cf229165a..b270baf67 100644 --- a/src/test/org/apache/http/mockup/HttpConnectionMockup.java +++ b/src/test/org/apache/http/mockup/HttpConnectionMockup.java @@ -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) { } }