Source code: org/apache/http/mockup/HttpConnectionMockup.java
1 package org.apache.http.mockup;
2
3 import java.io.IOException;
4
5 import org.apache.http.HttpConnection;
6
7 /**
8 * {@link HttpConnection} mockup implementation.
9 *
10 * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
11 */
12 public class HttpConnectionMockup implements HttpConnection {
13
14 private boolean open = true;
15
16 public HttpConnectionMockup() {
17 super();
18 }
19
20 public void close() throws IOException {
21 this.open = false;
22 }
23
24 public void shutdown() throws IOException {
25 this.open = false;
26 }
27
28 public int getSocketTimeout() throws IOException {
29 return 0;
30 }
31
32 public boolean isOpen() {
33 return this.open;
34 }
35
36 public boolean isStale() {
37 return false;
38 }
39
40 public void setSocketTimeout(int timeout) throws IOException {
41 }
42 }