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:
parent
804d75f23c
commit
8055c100ca
|
@ -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
|
// non-javadoc, see interface HttpClientConnection
|
||||||
public void flush()
|
public void flush()
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
|
@ -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 HttpConnectionAdapter
|
||||||
|
|
||||||
} // class ThreadSafeClientConnManager
|
} // class ThreadSafeClientConnManager
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class HttpConnectionMockup implements HttpConnection {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSocketTimeout() throws IOException {
|
public int getSocketTimeout() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +67,6 @@ public class HttpConnectionMockup implements HttpConnection {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSocketTimeout(int timeout) throws IOException {
|
public void setSocketTimeout(int timeout) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue