|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.conn.MultihomePlainSocketFactory
SchemeSocketFactory interface.
@Deprecated @Contract(threading=IMMUTABLE) public final class MultihomePlainSocketFactory
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
createSocket() method.
| Method Summary | |
|---|---|
Socket |
connectSocket(Socket socket,
String host,
int port,
InetAddress localAddress,
int localPort,
org.apache.http.params.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MultihomePlainSocketFactory getSocketFactory()
public Socket createSocket()
SocketFactoryconnectSocket.
createSocket in interface SocketFactory
public Socket connectSocket(Socket socket,
String host,
int port,
InetAddress localAddress,
int localPort,
org.apache.http.params.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 SocketFactorysocket - socket to connect to any of the given addresseshost - Host name to connect toport - the port to connect tolocalAddress - local addresslocalPort - local portparams - HTTP parameters
sock argument 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 IllegalArgumentException
isSecure in interface SocketFactorysock - the connected socket
false
IllegalArgumentException - if the argument is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||