SchemeSocketFactory interface.@Deprecated @Immutable public final class MultihomePlainSocketFactory extends Object implements SocketFactory
InetAddresses. Please note
the connectSocket(Socket, String, int, InetAddress, int, HttpParams)
method cannot be reliably interrupted by closing the socket returned by the
createSocket() method.| Modifier and Type | Method and Description |
|---|---|
Socket |
connectSocket(Socket sock,
String host,
int port,
InetAddress localAddress,
int localPort,
HttpParams params)
Deprecated.
Attempts to connects the socket to any of the
InetAddresses the
given host name resolves to. |
Socket |
createSocket()
Deprecated.
Creates a new, unconnected socket.
|
static MultihomePlainSocketFactory |
getSocketFactory()
Deprecated.
Gets the singleton instance of this class.
|
boolean |
isSecure(Socket sock)
Deprecated.
Checks whether a socket connection is secure.
|
public static MultihomePlainSocketFactory getSocketFactory()
public Socket createSocket()
SocketFactoryconnectSocket.createSocket in interface SocketFactorypublic Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int localPort, HttpParams params) throws IOException
InetAddresses the
given host name resolves to. If connection to all addresses fail, the
last I/O exception is propagated to the caller.connectSocket in interface SocketFactorysock - socket to connect to any of the given addresseshost - Host name to connect toport - the port to connect tolocalAddress - local addresslocalPort - local portparams - HTTP parameterssock argument if this factory supports
a layered protocol.IOException - if an error occurs during the connectionSocketTimeoutException - if timeout expires before connectingpublic final boolean isSecure(Socket sock) throws IllegalArgumentException
isSecure in interface SocketFactorysock - the connected socketfalseIllegalArgumentException - if the argument is invalidCopyright © 1999–2013 The Apache Software Foundation. All rights reserved.