forked from ringcentral/pubnub-jtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpClient.java
More file actions
34 lines (22 loc) · 914 Bytes
/
Copy pathHttpClient.java
File metadata and controls
34 lines (22 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.pubnub.api;
import java.io.IOException;
import java.util.Hashtable;
import com.pubnub.api.PubnubException;
abstract class HttpClient {
protected Hashtable _headers;
public static HttpClient getClient(int connectionTimeout, int requestTimeout, Hashtable headers) {
return new HttpClientCore(connectionTimeout, requestTimeout, headers);
}
public void reset() {
shutdown();
}
public abstract int getRequestTimeout();
public abstract void setRequestTimeout(int requestTimeout);
public abstract int getConnectionTimeout();
public abstract void setConnectionTimeout(int connectionTimeout);
public abstract void shutdown();
public abstract HttpResponse fetch(String url) throws IOException,
PubnubException;
public abstract HttpResponse fetch(String url, Hashtable headers)
throws IOException, PubnubException;
}