|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.conn.scheme.PlainSocketFactory
PlainConnectionSocketFactory
@Contract(threading=IMMUTABLE) @Deprecated public class PlainSocketFactory
The default class for creating plain (unencrypted) sockets.
Constructor Summary | |
---|---|
PlainSocketFactory()
Deprecated. |
|
PlainSocketFactory(HostNameResolver nameResolver)
Deprecated. (4.1) use DnsResolver |
Method Summary | |
---|---|
Socket |
connectSocket(Socket socket,
InetSocketAddress remoteAddress,
InetSocketAddress localAddress,
org.apache.http.params.HttpParams params)
Deprecated. Connects a socket to the target host with the given remote address. |
Socket |
connectSocket(Socket socket,
String host,
int port,
InetAddress localAddress,
int localPort,
org.apache.http.params.HttpParams params)
Deprecated. (4.1) Use connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams) |
Socket |
createSocket()
Deprecated. Creates a new, unconnected socket. |
Socket |
createSocket(org.apache.http.params.HttpParams params)
Deprecated. Creates a new, unconnected socket. |
static PlainSocketFactory |
getSocketFactory()
Deprecated. Gets the default factory. |
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 |
Constructor Detail |
---|
@Deprecated public PlainSocketFactory(HostNameResolver nameResolver)
DnsResolver
public PlainSocketFactory()
Method Detail |
---|
public static PlainSocketFactory getSocketFactory()
public Socket createSocket(org.apache.http.params.HttpParams params)
SchemeSocketFactory
SchemeSocketFactory.connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)
.
createSocket
in interface SchemeSocketFactory
params
- Optional parameters. Parameters passed to this method will have no effect.
This method will create a unconnected instance of Socket
class
using default constructor.
public Socket createSocket()
SocketFactory
connectSocket
.
createSocket
in interface SocketFactory
public Socket connectSocket(Socket socket, InetSocketAddress remoteAddress, InetSocketAddress localAddress, org.apache.http.params.HttpParams params) throws IOException, ConnectTimeoutException
SchemeSocketFactory
Please note that HttpInetSocketAddress
class should
be used in order to pass the target remote address along with the original
HttpHost
value used to resolve the address. The use of
HttpInetSocketAddress
can also ensure that no reverse
DNS lookup will be performed if the target remote address was specified
as an IP address.
connectSocket
in interface SchemeSocketFactory
socket
- the socket to connect, as obtained from
createSocket
.
null
indicates that a new socket
should be created and connected.remoteAddress
- the remote address to connect to.localAddress
- the local address to bind the socket to, or
null
for anyparams
- additional parameters
for connecting
sock
argument if this factory supports
a layered protocol.
IOException
- if an I/O error occurs
UnknownHostException
- if the IP address of the target host
can not be determined
ConnectTimeoutException
- if the socket cannot be connected
within the time limit defined in the params
HttpInetSocketAddress
public final boolean isSecure(Socket sock)
isSecure
in interface SchemeSocketFactory
isSecure
in interface SocketFactory
sock
- the connected socket
false
@Deprecated public Socket connectSocket(Socket socket, String host, int port, InetAddress localAddress, int localPort, org.apache.http.params.HttpParams params) throws IOException, UnknownHostException, ConnectTimeoutException
connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)
SocketFactory
connectSocket
in interface SocketFactory
socket
- the socket to connect, as obtained from
createSocket
.
null
indicates that a new socket
should be created and connected.host
- the host to connect toport
- the port to connect to on the hostlocalAddress
- the local address to bind the socket to, or
null
for anylocalPort
- the port on the local machine,
0 or a negative number for anyparams
- additional parameters
for connecting
sock
argument if this factory supports
a layered protocol.
IOException
- if an I/O error occurs
UnknownHostException
- if the IP address of the target host
can not be determined
ConnectTimeoutException
- if the socket cannot be connected
within the time limit defined in the params
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |