All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pubnub.api.HttpClient Maven / Gradle / Ivy

Go to download

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!

The newest version!
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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy