|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.conn.DefaultClientConnectionOperator
public class DefaultClientConnectionOperator
Default implementation of a
ClientConnectionOperator
.
It uses a SchemeRegistry
to look up
SocketFactory
objects.
Field Summary | |
---|---|
protected SchemeRegistry |
schemeRegistry
The scheme registry for looking up socket factories. |
Constructor Summary | |
---|---|
DefaultClientConnectionOperator(SchemeRegistry schemes)
Creates a new client connection operator for the given scheme registry. |
Method Summary | |
---|---|
OperatedClientConnection |
createConnection()
Creates a new connection that can be operated. |
void |
openConnection(OperatedClientConnection conn,
org.apache.http.HttpHost target,
java.net.InetAddress local,
org.apache.http.protocol.HttpContext context,
org.apache.http.params.HttpParams params)
Opens a connection to the given target host. |
protected void |
prepareSocket(java.net.Socket sock,
org.apache.http.protocol.HttpContext context,
org.apache.http.params.HttpParams params)
Performs standard initializations on a newly created socket. |
void |
updateSecureConnection(OperatedClientConnection conn,
org.apache.http.HttpHost target,
org.apache.http.protocol.HttpContext context,
org.apache.http.params.HttpParams params)
Updates a connection with a layered secure connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SchemeRegistry schemeRegistry
Constructor Detail |
---|
public DefaultClientConnectionOperator(SchemeRegistry schemes)
schemes
- the scheme registryMethod Detail |
---|
public OperatedClientConnection createConnection()
ClientConnectionOperator
createConnection
in interface ClientConnectionOperator
public void openConnection(OperatedClientConnection conn, org.apache.http.HttpHost target, java.net.InetAddress local, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
ClientConnectionOperator
openConnection
in interface ClientConnectionOperator
conn
- the connection to opentarget
- the target host to connect tolocal
- the local address to route from, or
null
for the defaultcontext
- the context for the connectionparams
- the parameters for the connection
java.io.IOException
- in case of a problempublic void updateSecureConnection(OperatedClientConnection conn, org.apache.http.HttpHost target, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
ClientConnectionOperator
updateSecureConnection
in interface ClientConnectionOperator
conn
- the open connection to updatetarget
- the target host for the updated connection.
The connection must already be open or tunnelled
to the host and port, but the scheme of the target
will be used to create a layered connection.context
- the context for the connectionparams
- the parameters for the updated connection
java.io.IOException
- in case of a problemprotected void prepareSocket(java.net.Socket sock, org.apache.http.protocol.HttpContext context, org.apache.http.params.HttpParams params) throws java.io.IOException
sock
- the socket to preparecontext
- the context for the connectionparams
- the parameters from which to prepare the socket
java.io.IOException
- in case of an IO problem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |