Examples of connectSocket()


Examples of org.apache.http.conn.socket.ConnectionSocketFactory.connectSocket()

            if (this.log.isDebugEnabled()) {
                this.log.debug("Connecting to " + remoteAddress);
            }
            try {
                sock.setSoTimeout(socketConfig.getSoTimeout());
                sock = sf.connectSocket(
                        connectTimeout, sock, host, remoteAddress, localAddress, context);
                sock.setTcpNoDelay(socketConfig.isTcpNoDelay());
                sock.setKeepAlive(socketConfig.isSoKeepAlive());
                final int linger = socketConfig.getSoLinger();
                if (linger >= 0) {
View Full Code Here

Examples of org.apache.http.conn.socket.ConnectionSocketFactory.connectSocket()

        Mockito.when(schemePortResolver.resolve(proxy)).thenReturn(8080);
        Mockito.when(schemePortResolver.resolve(target)).thenReturn(8443);
        Mockito.when(socketFactoryRegistry.lookup("http")).thenReturn(plainsf);
        Mockito.when(socketFactoryRegistry.lookup("https")).thenReturn(sslsf);
        Mockito.when(plainsf.createSocket(Mockito.<HttpContext>any())).thenReturn(socket);
        Mockito.when(plainsf.connectSocket(
                Mockito.anyInt(),
                Mockito.eq(socket),
                Mockito.<HttpHost>any(),
                Mockito.<InetSocketAddress>any(),
                Mockito.<InetSocketAddress>any(),
View Full Code Here

Examples of org.apache.http.conn.socket.ConnectionSocketFactory.connectSocket()

            final InetSocketAddress remoteAddress = new InetSocketAddress(address, port);
            if (this.log.isDebugEnabled()) {
                this.log.debug("Connecting to " + remoteAddress);
            }
            try {
                sock = sf.connectSocket(
                        connectTimeout, sock, host, remoteAddress, localAddress, context);
                conn.bind(sock);
                if (this.log.isDebugEnabled()) {
                    this.log.debug("Connection established " + conn);
                }
View Full Code Here

Examples of org.apache.http.conn.socket.ConnectionSocketFactory.connectSocket()

        Mockito.when(schemePortResolver.resolve(proxy)).thenReturn(8080);
        Mockito.when(schemePortResolver.resolve(target)).thenReturn(8443);
        Mockito.when(socketFactoryRegistry.lookup("http")).thenReturn(plainsf);
        Mockito.when(socketFactoryRegistry.lookup("https")).thenReturn(sslsf);
        Mockito.when(plainsf.createSocket(Mockito.<HttpContext>any())).thenReturn(mockSock);
        Mockito.when(plainsf.connectSocket(
                Mockito.anyInt(),
                Mockito.eq(mockSock),
                Mockito.<HttpHost>any(),
                Mockito.<InetSocketAddress>any(),
                Mockito.<InetSocketAddress>any(),
View Full Code Here

Examples of org.apache.http.conn.socket.ConnectionSocketFactory.connectSocket()

            final InetSocketAddress remoteAddress = new InetSocketAddress(address, port);
            if (this.log.isDebugEnabled()) {
                this.log.debug("Connecting to " + remoteAddress);
            }
            try {
                sock = sf.connectSocket(
                        connectTimeout, sock, host, remoteAddress, localAddress, context);
                conn.bind(sock);
                if (this.log.isDebugEnabled()) {
                    this.log.debug("Connection established " + conn);
                }
View Full Code Here

Examples of org.apache.http.conn.socket.ConnectionSocketFactory.connectSocket()

            if (this.log.isDebugEnabled()) {
                this.log.debug("Connecting to " + remoteAddress);
            }
            try {
                sock.setSoTimeout(socketConfig.getSoTimeout());
                sock = sf.connectSocket(
                        connectTimeout, sock, host, remoteAddress, localAddress, context);
                sock.setTcpNoDelay(socketConfig.isTcpNoDelay());
                sock.setKeepAlive(socketConfig.isSoKeepAlive());
                final int linger = socketConfig.getSoLinger();
                if (linger >= 0) {
View Full Code Here

Examples of org.apache.http.conn.socket.LayeredConnectionSocketFactory.connectSocket()

                                final HttpHost host,
                                final InetSocketAddress remoteAddress,
                                final InetSocketAddress localAddress,
                                final HttpContext context) throws IOException {
        LayeredConnectionSocketFactory factory = getSSLSocketFactory();
        return factory.connectSocket(connectTimeout, sock, host, remoteAddress, localAddress, context);
    }

    private LayeredConnectionSocketFactory getSSLSocketFactory() {
        final Configuration currentConfiguration = MfClientHttpRequestFactoryImpl.getCurrentConfiguration();
        if (currentConfiguration == null || currentConfiguration.getCertificateStore() == null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.