Top Description Methods
org.apache.http.conn.socket

public Interface LayeredConnectionSocketFactory

extends ConnectionSocketFactory
Known Direct Implementers
org.apache.http.conn.ssl.SSLConnectionSocketFactory, org.apache.http.conn.ssl.SSLSocketFactory
Imports
java.io.IOException, java.net.Socket, .UnknownHostException, org.apache.http.protocol.HttpContext

Extended ConnectionSocketFactory interface for layered sockets such as SSL/TLS.
Since
4.3

Method Summary

Modifier and TypeMethod and Description
public Socket

Returns:

Socket a new socket
createLayeredSocket
(Socket
the existing socket
socket
,
String
the name of the target host.
target
,
int
the port to connect to on the target host.
port
,
HttpContext
the actual HTTP context.
context
)

Returns a socket connected to the given host that is layered over an existing socket.

Inherited from org.apache.http.conn.socket.ConnectionSocketFactory:
connectSocketcreateSocket

Method Detail

createLayeredSocketback to summary
public Socket createLayeredSocket(Socket socket, String target, int port, HttpContext context) throws IOException, UnknownHostException

Returns a socket connected to the given host that is layered over an existing socket. Used primarily for creating secure sockets through proxies.

Parameters
socket:Socket

the existing socket

target:String

the name of the target host.

port:int

the port to connect to on the target host.

context:HttpContext

the actual HTTP context.

Returns:Socket

Socket a new socket

Exceptions
IOException:
if an I/O error occurs while creating the socket