hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r406435 - in /jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup: ./ HttpConnectionMockup.java
Date Sun, 14 May 2006 21:26:01 GMT
Author: olegk
Date: Sun May 14 14:26:00 2006
New Revision: 406435

URL: http://svn.apache.org/viewcvs?rev=406435&view=rev
Log:
Added HttpConnectionMockup class

Added:
    jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/
    jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/HttpConnectionMockup.java
  (with props)

Added: jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/HttpConnectionMockup.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/HttpConnectionMockup.java?rev=406435&view=auto
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/HttpConnectionMockup.java
(added)
+++ jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/HttpConnectionMockup.java
Sun May 14 14:26:00 2006
@@ -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 {
+    }
+}

Propchange: jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/HttpConnectionMockup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/HttpConnectionMockup.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpcomponents/httpclient/trunk/src/test/org/apache/http/mockup/HttpConnectionMockup.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message