Package org.apache.http

Examples of org.apache.http.Scheme


        if (this.tunneltarget != null) {
            throw new IllegalStateException("Secure tunnel to " +
                    this.tunneltarget + " is already active");
        }
        assertOpen();
        Scheme protocol = targetHost.getScheme();
        SocketFactory socketfactory = protocol.getSocketFactory();
        if (socketfactory instanceof SecureSocketFactory) {
            Socket socket = ((SecureSocketFactory)socketfactory)
                .createSocket(
                    this.socket,
                    targetHost.getHostName(),
View Full Code Here


        HttpParams params = (HttpParams) beanfactory.getBean("params");
       
        HttpRequestExecutor httpexec = (HttpRequestExecutor)beanfactory.getBean("http-executor");
        httpexec.setParams(params);
       
        Scheme http = (Scheme) beanfactory.getBean("http-scheme");
        HttpHost host = new HttpHost("www.yahoo.com", 80, http);

        HttpRequestFactory requestfactory = (HttpRequestFactory) beanfactory.getBean("http-request-factory");
        HttpClientConnection conn = (HttpClientConnection) beanfactory.getBean("http-connection");
        ConnectionReuseStrategy connStrategy = (ConnectionReuseStrategy) beanfactory.getBean("conn-reuse-strategy");
View Full Code Here

        // Parse the target url
        URL url = new URL(args[0]);
       
        // Register standard protocol schemes
        Scheme.registerScheme("http",
                new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        Scheme.registerScheme("https",
                new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));

        // Prepare connection
        HttpHost host = new HttpHost(
                url.getHost(),
                url.getPort(),
View Full Code Here

        HttpParams params = (HttpParams) beanfactory.getBean("params");
       
        HttpRequestExecutor httpexec = (HttpRequestExecutor)beanfactory.getBean("http-executor");
        httpexec.setParams(params);
       
        Scheme http = (Scheme) beanfactory.getBean("http-scheme");
        HttpHost host = new HttpHost("www.yahoo.com", 80, http);

        HttpRequestFactory requestfactory = (HttpRequestFactory) beanfactory.getBean("http-request-factory");
        HttpClientConnection conn = (HttpClientConnection) beanfactory.getBean("http-connection");
        ConnectionReuseStrategy connStrategy = (ConnectionReuseStrategy) beanfactory.getBean("conn-reuse-strategy");
View Full Code Here

        // Parse the target url
        URL url = new URL(args[0]);
       
        // Register standard protocol schemes
        Scheme.registerScheme("http",
                new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        Scheme.registerScheme("https",
                new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));

        // Prepare connection
        HttpHost host = new HttpHost(
                url.getHost(),
                url.getPort(),
View Full Code Here

        if (this.tunneltarget != null) {
            throw new IllegalStateException("Secure tunnel to " +
                    this.tunneltarget + " is already active");
        }
        assertOpen();
        Scheme protocol = targetHost.getScheme();
        SocketFactory socketfactory = protocol.getSocketFactory();
        if (socketfactory instanceof SecureSocketFactory) {
            Socket socket = ((SecureSocketFactory)socketfactory)
                .createSocket(
                    this.socket,
                    targetHost.getHostName(),
View Full Code Here

public class ElementalHttpPost {

    public static void main(String[] args) throws Exception {
       
        SocketFactory socketfactory = PlainSocketFactory.getSocketFactory();
        Scheme.registerScheme("http", new Scheme("http", socketfactory, 80));

        HttpParams params = new DefaultHttpParams(null);
        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
        HttpProtocolParams.setContentCharset(params, "UTF-8");
        HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1");
View Full Code Here

public class ElementalHttpGet {

    public static void main(String[] args) throws Exception {
       
        SocketFactory socketfactory = PlainSocketFactory.getSocketFactory();
        Scheme.registerScheme("http", new Scheme("http", socketfactory, 80));

        HttpParams params = new DefaultHttpParams(null);
        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
        HttpProtocolParams.setContentCharset(params, "UTF-8");
        HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1");
View Full Code Here

public class ElementalHttpPost {

    public static void main(String[] args) throws Exception {
       
        SocketFactory socketfactory = PlainSocketFactory.getSocketFactory();
        Scheme.registerScheme("http", new Scheme("http", socketfactory, 80));

        HttpParams params = new DefaultHttpParams(null);
        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
        HttpProtocolParams.setContentCharset(params, "UTF-8");
        HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1");
View Full Code Here

public class ElementalHttpGet {

    public static void main(String[] args) throws Exception {
       
        SocketFactory socketfactory = PlainSocketFactory.getSocketFactory();
        Scheme.registerScheme("http", new Scheme("http", socketfactory, 80));

        HttpParams params = new DefaultHttpParams(null);
        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
        HttpProtocolParams.setContentCharset(params, "UTF-8");
        HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1");
View Full Code Here

TOP

Related Classes of org.apache.http.Scheme

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.