SchemeSocketFactory interface.@Deprecated @Immutable public final class MultihomePlainSocketFactory extends java.lang.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.| 限定符和类型 | 方法和说明 |
|---|---|
java.net.Socket |
connectSocket(java.net.Socket sock,
java.lang.String host,
int port,
java.net.InetAddress localAddress,
int localPort,
HttpParams params)
已过时。
Attempts to connects the socket to any of the
InetAddresses the
given host name resolves to. |
java.net.Socket |
createSocket()
已过时。
Creates a new, unconnected socket.
|
static MultihomePlainSocketFactory |
getSocketFactory()
已过时。
Gets the singleton instance of this class.
|
boolean |
isSecure(java.net.Socket sock)
已过时。
Checks whether a socket connection is secure.
|
public static MultihomePlainSocketFactory getSocketFactory()
public java.net.Socket createSocket()
SocketFactoryconnectSocket.createSocket 在接口中 SocketFactorypublic java.net.Socket connectSocket(java.net.Socket sock,
java.lang.String host,
int port,
java.net.InetAddress localAddress,
int localPort,
HttpParams params)
throws java.io.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 在接口中 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.java.io.IOException - if an error occurs during the connectionjava.net.SocketTimeoutException - if timeout expires before connectingpublic final boolean isSecure(java.net.Socket sock)
throws java.lang.IllegalArgumentException
isSecure 在接口中 SocketFactorysock - the connected socketfalsejava.lang.IllegalArgumentException - if the argument is invalid