Package org.apache.http.io

Examples of org.apache.http.io.SocketFactory


        return new TestSuite(TestHttpHost.class);
    }

    protected void setUp() throws Exception {
        super.setUp();
        SocketFactory socketfactory = PlainSocketFactory.getSocketFactory();
        final Scheme http = new Scheme("http", socketfactory, 80);
        Scheme.registerScheme("http", http);
    }
View Full Code Here


        }
        assertNotOpen();
        if (this.targethost == null) {
          throw new IllegalStateException("Target host not specified");
        }
        SocketFactory socketfactory = this.targethost.getScheme().getSocketFactory();
        Socket socket = socketfactory.createSocket(
                this.targethost.getHostName(), this.targethost.getPort(),
                this.localAddress, 0,
                params);
        bind(socket, params);
    }
View Full Code Here

            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

        return new TestSuite(TestHttpHost.class);
    }

    protected void setUp() throws Exception {
        super.setUp();
        SocketFactory socketfactory = PlainSocketFactory.getSocketFactory();
        final Scheme http = new Scheme("http", socketfactory, 80);
        Scheme.registerScheme("http", http);
    }
View Full Code Here

        }
        assertNotOpen();
        if (this.targethost == null) {
          throw new IllegalStateException("Target host not specified");
        }
        SocketFactory socketfactory = this.targethost.getScheme().getSocketFactory();
        Socket socket = socketfactory.createSocket(
                this.targethost.getHostName(), this.targethost.getPort(),
                this.localAddress, 0,
                params);
        bind(socket, params);
        this.maxHeaderCount = params.getIntParameter(HttpConnectionParams.MAX_HEADER_COUNT, -1);
View Full Code Here

            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");
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");
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");
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");
View Full Code Here

TOP

Related Classes of org.apache.http.io.SocketFactory

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.