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

com.ning.api.client.http.jdk.JdkClientImpl Maven / Gradle / Ivy

There is a newer version: 0.5.1
Show newest version
package com.ning.api.client.http.jdk;

import com.ning.api.client.http.NingHttpClient;
import com.ning.api.client.http.NingHttpDelete;
import com.ning.api.client.http.NingHttpGet;
import com.ning.api.client.http.NingHttpPost;
import com.ning.api.client.http.NingHttpPut;

import com.ning.api.client.auth.OAuthSignatureCalculator;

/**
 * Implementation of {@link NingHttpClient} that uses Ning async HTTP client
 * for HTTP connectivity
 */
public class JdkClientImpl extends NingHttpClient
{
    public JdkClientImpl() { }

    public NingHttpDelete prepareDelete(String url, OAuthSignatureCalculator sig) {
        return new NingHttpDelete(new JdkRequestBuilderImpl(url, sig, "DELETE"));
    }
    
    public NingHttpGet prepareGet(String url, OAuthSignatureCalculator sig) {
        return new NingHttpGet(new JdkRequestBuilderImpl(url, sig, "GET"));
    }
    
    public NingHttpPost preparePost(String url, OAuthSignatureCalculator sig) {
        return new NingHttpPost(new JdkRequestBuilderImpl(url, sig, "POST"));
    }

    public NingHttpPut preparePut(String url, OAuthSignatureCalculator sig) {
        return new NingHttpPut(new JdkRequestBuilderImpl(url, sig, "PUT"));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy