java.lang.Object | |
↳ | org.apache.http.conn.scheme.PlainSocketFactory |
The default class for creating plain (unencrypted) sockets.
The following parameters can be used to customize the behavior of this class:
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Connects a socket to the target host with the given remote address.
| |||||||||||
This method is deprecated.
Use
connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)
| |||||||||||
Creates a new, unconnected socket.
| |||||||||||
Creates a new, unconnected socket.
| |||||||||||
Gets the default factory.
| |||||||||||
Checks whether a socket connection is secure.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.http.conn.scheme.SchemeSocketFactory
| |||||||||||
From interface
org.apache.http.conn.scheme.SocketFactory
|
Connects a socket to the target host with the given remote address.
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 any |
params | additional parameters for connecting |
sock
argument if this factory supports
a layered protocol.
This method is deprecated.
Use connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)
Connects a socket to the given host.
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 to |
port | the port to connect to on the host |
localAddress | the local address to bind the socket to, or
null for any |
localPort | the port on the local machine, 0 or a negative number for any |
params | additional parameters for connecting |
sock
argument if this factory supports
a layered protocol.Creates a new, unconnected socket.
The socket should subsequently be passed to
connectSocket
.
Creates a new, unconnected socket. The socket should subsequently be passed to
connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)
.
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. |
---|
Gets the default factory.
Checks whether a socket connection is secure. This factory creates plain socket connections which are not considered secure.
sock | the connected socket |
---|
false
IllegalArgumentException | if the argument is invalid |
---|