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

public Interface LayeredSocketFactory

extends SocketFactory
Known Direct Implementers
org.apache.http.conn.scheme.LayeredSocketFactoryAdaptor, org.apache.http.conn.ssl.SSLSocketFactory
Annotations
@Deprecated
Imports
java.io.IOException, java.net.Socket, .UnknownHostException

Deprecated

(4.1) use SchemeSocketFactory

A SocketFactory for layered sockets (SSL/TLS). See there for things to consider when implementing a socket factory.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public Socket

Returns:

Socket a new socket
createSocket
(Socket
the existing socket
socket
,
String
the host name/IP
host
,
int
the port on the host
port
,
boolean
a flag for closing the underling socket when the created socket is closed
autoClose
)

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

Inherited from org.apache.http.conn.scheme.SocketFactory:
connectSocketcreateSocketisSecure

Method Detail

createSocketback to summary
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) 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

host:String

the host name/IP

port:int

the port on the host

autoClose:boolean

a flag for closing the underling socket when the created socket is closed

Returns:Socket

Socket a new socket

Exceptions
IOException:
if an I/O error occurs while creating the socket
UnknownHostException:
if the IP address of the host cannot be determined