@Contract(threading=STATELESS) public interface ConnectionSocketFactory
| Modifier and Type | Method and Description | 
|---|---|
| default Socket | connectSocket(Socket socket,
             HttpHost host,
             InetSocketAddress remoteAddress,
             InetSocketAddress localAddress,
             Timeout connectTimeout,
             Object attachment,
             HttpContext context)Connects the socket to the target host with the given resolved remote address. | 
| Socket | connectSocket(TimeValue connectTimeout,
             Socket socket,
             HttpHost host,
             InetSocketAddress remoteAddress,
             InetSocketAddress localAddress,
             HttpContext context)Connects the socket to the target host with the given resolved remote address. | 
| Socket | createSocket(HttpContext context)Creates new, unconnected socket. | 
| default Socket | createSocket(Proxy proxy,
            HttpContext context)Creates new, unconnected socket via a proxy (generally SOCKS is expected). | 
Socket createSocket(HttpContext context) throws IOException
connectSocket method.IOException@Internal default Socket createSocket(Proxy proxy, HttpContext context) throws IOException
connectSocket method.IOExceptionSocket connectSocket(TimeValue connectTimeout, Socket socket, HttpHost host, InetSocketAddress remoteAddress, InetSocketAddress localAddress, HttpContext context) throws IOException
connectTimeout - connect timeout.socket - the socket to connect, as obtained from 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.sock argument if this factory supports
          a layered protocol.IOException - if an I/O error occursdefault Socket connectSocket(Socket socket, HttpHost host, InetSocketAddress remoteAddress, InetSocketAddress localAddress, Timeout connectTimeout, Object attachment, HttpContext context) throws IOException
socket - the socket to connect, as obtained from 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.connectTimeout - connect timeout.attachment - connect request attachment.context - the actual HTTP context.sock argument if this factory supports
          a layered protocol.IOException - if an I/O error occursCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.