Package org.apache.commons.httpclient.protocol

Examples of org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory


        super(arg0);
    }

    public void testProtocol() {
       
        Protocol p1 = new Protocol("test", new DefaultProtocolSocketFactory(), 123);
        Protocol p2 = new Protocol("test", new DefaultProtocolSocketFactory(), 123);
       
        assertTrue(p1.equals(p2));
        assertTrue(p2.equals(p1));
    }
View Full Code Here


        assertTrue(p2.equals(p1));
    }
   
    public void testProtocolSocketFactory() {
       
        ProtocolSocketFactory p1 = new DefaultProtocolSocketFactory();
        ProtocolSocketFactory p2 = new DefaultProtocolSocketFactory();

        assertTrue(p1.equals(p2));
        assertTrue(p2.equals(p1));

        p1 = new SSLProtocolSocketFactory();
        p2 = new SSLProtocolSocketFactory();

        assertTrue(p1.equals(p2));
        assertTrue(p2.equals(p1));
       
    }
View Full Code Here

                usingSecureSocket = isSecure() && !isProxied();
                // use the protocol's socket factory unless this is a secure
                // proxied connection
                final ProtocolSocketFactory socketFactory =
                    (isSecure() && isProxied()
                            ? new DefaultProtocolSocketFactory()
                            : protocolInUse.getSocketFactory());
                this.socket = socketFactory.createSocket(
                            host, port,
                            localAddress, 0,
                            this.params);
View Full Code Here

                // use the protocol's socket factory unless this is a secure
                // proxied connection
                final ProtocolSocketFactory socketFactory =
                    (isSecure() && isProxied()
                            ? new DefaultProtocolSocketFactory()
                            : protocolInUse.getSocketFactory());

                if (connectTimeout == 0) {
                    if (localAddress != null) {
                        socket = socketFactory.createSocket(host, port, localAddress, 0);
View Full Code Here

                // use the protocol's socket factory unless this is a secure
                // proxied connection
                final ProtocolSocketFactory socketFactory =
                    (isSecure() && isProxied()
                            ? new DefaultProtocolSocketFactory()
                            : protocolInUse.getSocketFactory());

                if (connectTimeout == 0) {
                    if (localAddress != null) {
                        socket = socketFactory.createSocket(host, port, localAddress, 0);
View Full Code Here

                _usingSecureSocket = isSecure() && !isProxied();               
               
                final ProtocolSocketFactory socketFactory = (
                    isSecure() && !isProxied()
                    ? _protocol.getSocketFactory()
                    : new DefaultProtocolSocketFactory()
                );
               
                if (connect_timeout == 0) {
                    _socket = socketFactory.createSocket(host,port);
                } else {
View Full Code Here

       
        public void test() throws Exception
        {
            try
            {
                Protocol httpxProtocol = new Protocol(HTTPX, new DefaultProtocolSocketFactory(), 81);
                Protocol.registerProtocol(HTTPX, httpxProtocol);
               
                doTest();
            }
            finally
View Full Code Here

                // use the protocol's socket factory unless this is a secure
                // proxied connection
                final ProtocolSocketFactory socketFactory =
                    (isSecure() && isProxied()
                            ? new DefaultProtocolSocketFactory()
                            : protocolInUse.getSocketFactory());

                if (connectTimeout == 0) {
                    if (localAddress != null) {
                        socket = socketFactory.createSocket(host, port, localAddress, 0);
View Full Code Here

                usingSecureSocket = isSecure() && !isProxied();
                // use the protocol's socket factory unless this is a secure
                // proxied connection
                final ProtocolSocketFactory socketFactory =
                    (isSecure() && isProxied()
                            ? new DefaultProtocolSocketFactory()
                            : protocolInUse.getSocketFactory());
                this.socket = socketFactory.createSocket(
                            host, port,
                            localAddress, 0,
                            this.params);
View Full Code Here

        super(arg0);
    }

    public void testProtocol() {
       
        Protocol p1 = new Protocol("test", new DefaultProtocolSocketFactory(), 123);
        Protocol p2 = new Protocol("test", new DefaultProtocolSocketFactory(), 123);
       
        assertTrue(p1.equals(p2));
        assertTrue(p2.equals(p1));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory

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.