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

public Interface LayeredSchemeSocketFactory

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

Deprecated

(4.2) use SchemeLayeredSocketFactory

Extended SchemeSocketFactory interface for layered sockets such as SSL/TLS.
Since
4.1

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
,
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.SchemeSocketFactory:
connectSocketcreateSocketisSecure

Method Detail

createLayeredSocketback to summary
public Socket createLayeredSocket(Socket socket, String target, 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

target:String

the name of the target host.

port:int

the port to connect to on the target 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