Class PlainConnectionSocketFactory

    • Constructor Detail

      • PlainConnectionSocketFactory

        public PlainConnectionSocketFactory()
    • Method Detail

      • createSocket

        public createSocket​(HttpContext context)
        Description copied from interface: ConnectionSocketFactory
        Creates new, unconnected socket. The socket should subsequently be passed to connectSocket method.
        Specified by:
        createSocket in interface ConnectionSocketFactory
        a new socket
        Throws: - if an I/O error occurs while creating the socket
      • connectSocket

        public connectSocket​(int connectTimeout,
                                             HttpHost host,
                                             HttpContext context)
        Description copied from interface: ConnectionSocketFactory
        Connects the socket to the target host with the given resolved remote address.
        Specified by:
        connectSocket in interface ConnectionSocketFactory
        connectTimeout - connect timeout.
        socket - the socket to connect, as obtained from ConnectionSocketFactory.createSocket(HttpContext). null indicates that a new socket should be created and connected.
        host - target host as specified by the caller (end user).
        remoteAddress - the resolved remote address to connect to.
        localAddress - the local address to bind the socket to, or null for any.
        context - the actual HTTP context.
        the connected socket. The returned object may be different from the sock argument if this factory supports a layered protocol.
        Throws: - if an I/O error occurs