- All Implemented Interfaces:
@Deprecated @Contract(threading=IMMUTABLE) public final class MultihomePlainSocketFactory extends Object implements SocketFactoryDeprecated.(4.1) Do not use. For multihome support socket factories must implement
SchemeSocketFactoryinterface.Socket factory that implements a simple multi-home fail-over on connect failure, provided the same hostname resolves to multiple
InetAddresses. Please note the
connectSocket(Socket, String, int, InetAddress, int, HttpParams)method cannot be reliably interrupted by closing the socket returned by the
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description
connectSocket(Socket socket, 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.
createSocket()Deprecated.Creates a new, unconnected socket.
getSocketFactory()Deprecated.Gets the singleton instance of this class.
isSecure(Socket sock)Deprecated.Checks whether a socket connection is secure.
public static MultihomePlainSocketFactory getSocketFactory()Deprecated.Gets the singleton instance of this class.
- the one and only plain socket factory
public Socket createSocket()Deprecated.Description copied from interface:
SocketFactoryCreates a new, unconnected socket. The socket should subsequently be passed to
public Socket connectSocket(Socket socket, String host, int port, InetAddress localAddress, int localPort, HttpParams params) throws IOExceptionDeprecated.Attempts to connects the socket to any of the
InetAddresses the given host name resolves to. If connection to all addresses fail, the last I/O exception is propagated to the caller.
- Specified by:
socket- socket to connect to any of the given addresses
host- Host name to connect to
port- the port to connect to
localAddress- local address
localPort- local port
params- HTTP parameters
- the connected socket. The returned object may be different
sockargument if this factory supports a layered protocol.
IOException- if an error occurs during the connection
SocketTimeoutException- if timeout expires before connecting
public final boolean isSecure(Socket sock) throws IllegalArgumentExceptionDeprecated.Checks whether a socket connection is secure. This factory creates plain socket connections which are not considered secure.