Class PlainConnectionSocketFactory
java.lang.Object
org.apache.hc.client5.http.socket.PlainConnectionSocketFactory
- All Implemented Interfaces:
ConnectionSocketFactory
@Deprecated
@Contract(threading=STATELESS)
public class PlainConnectionSocketFactory
extends Object
implements ConnectionSocketFactory
Deprecated.
The default class for creating plain (unencrypted) sockets.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PlainConnectionSocketFactoryDeprecated.Default instance ofPlainConnectionSocketFactory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnectSocket(org.apache.hc.core5.util.TimeValue connectTimeout, Socket socket, org.apache.hc.core5.http.HttpHost host, InetSocketAddress remoteAddress, InetSocketAddress localAddress, org.apache.hc.core5.http.protocol.HttpContext context) Deprecated.Connects the socket to the target host with the given resolved remote address.createSocket(Proxy proxy, org.apache.hc.core5.http.protocol.HttpContext context) Deprecated.Creates new, unconnected socket via a proxy (generally SOCKS is expected).createSocket(org.apache.hc.core5.http.protocol.HttpContext context) Deprecated.Creates new, unconnected socket.static PlainConnectionSocketFactoryDeprecated.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConnectionSocketFactory
connectSocket
-
Field Details
-
INSTANCE
Deprecated.Default instance ofPlainConnectionSocketFactory.
-
-
Constructor Details
-
PlainConnectionSocketFactory
public PlainConnectionSocketFactory()Deprecated.
-
-
Method Details
-
getSocketFactory
Deprecated. -
createSocket
public Socket createSocket(Proxy proxy, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException Deprecated.Description copied from interface:ConnectionSocketFactoryCreates new, unconnected socket via a proxy (generally SOCKS is expected). The socket should subsequently be passed toconnectSocketmethod.- Specified by:
createSocketin interfaceConnectionSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(org.apache.hc.core5.http.protocol.HttpContext context) throws IOException Deprecated.Description copied from interface:ConnectionSocketFactoryCreates new, unconnected socket. The socket should subsequently be passed toconnectSocketmethod.- Specified by:
createSocketin interfaceConnectionSocketFactory- Throws:
IOException
-
connectSocket
public Socket connectSocket(org.apache.hc.core5.util.TimeValue connectTimeout, Socket socket, org.apache.hc.core5.http.HttpHost host, InetSocketAddress remoteAddress, InetSocketAddress localAddress, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException Deprecated.Description copied from interface:ConnectionSocketFactoryConnects the socket to the target host with the given resolved remote address.- Specified by:
connectSocketin interfaceConnectionSocketFactory- Parameters:
connectTimeout- connect timeout.socket- the socket to connect, as obtained fromConnectionSocketFactory.createSocket(HttpContext).nullindicates 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, ornullfor any.context- the actual HTTP context.- Returns:
- the connected socket. The returned object may be different
from the
sockargument if this factory supports a layered protocol. - Throws:
IOException- if an I/O error occurs
-
DetachedSocketFactory. Please note this interface is considered internal.