com.pubnub.api.HttpClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pubnub-android-debug Show documentation
Show all versions of pubnub-android-debug Show documentation
PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter second!
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;
}