public class SocketHttpConnectionProvider extends java.lang.Object implements HttpConnectionProvider
HttpConnectionProvider.Implementation
Modifier and Type | Field and Description |
---|---|
protected ProxyInfo |
proxy |
protected java.lang.String |
secureEnabledProtocols |
protected java.lang.String |
sslProtocol |
Constructor and Description |
---|
SocketHttpConnectionProvider() |
Modifier and Type | Method and Description |
---|---|
HttpConnection |
createHttpConnection(HttpRequest httpRequest)
Creates new connection from current
request . |
protected java.net.Socket |
createSocket(java.lang.String host,
int port,
int connectionTimeout)
Creates a socket using socket factory.
|
protected javax.net.ssl.SSLSocket |
createSSLSocket(java.lang.String host,
int port,
int connectionTimeout,
boolean trustAll,
boolean verifyHttpsHost)
Creates a SSL socket.
|
protected javax.net.ssl.SSLSocketFactory |
getDefaultSSLSocketFactory(boolean trustAllCertificates)
Returns default SSL socket factory allowing setting trust managers.
|
java.lang.String |
getSslProtocol()
Returns current SSL protocol used.
|
protected javax.net.SocketFactory |
resolveSocketFactory(ProxyInfo proxy,
boolean ssl,
boolean trustAllCertificates,
int connectionTimeout)
Returns socket factory based on proxy type and SSL requirements.
|
void |
setSecuredProtocols(java.lang.String secureEnabledProtocols)
CSV of default enabled secured protocols.
|
SocketHttpConnectionProvider |
setSslProtocol(java.lang.String sslProtocol)
Sets default SSL protocol to use.
|
void |
useProxy(ProxyInfo proxyInfo)
Defines proxy to use for created sockets.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
protected ProxyInfo proxy
protected java.lang.String secureEnabledProtocols
protected java.lang.String sslProtocol
public void useProxy(ProxyInfo proxyInfo)
useProxy
in interface HttpConnectionProvider
public void setSecuredProtocols(java.lang.String secureEnabledProtocols)
https.protocols
.public java.lang.String getSslProtocol()
public SocketHttpConnectionProvider setSslProtocol(java.lang.String sslProtocol)
public HttpConnection createHttpConnection(HttpRequest httpRequest) throws java.io.IOException
request
.createHttpConnection
in interface HttpConnectionProvider
java.io.IOException
createSocket(String, int, int)
protected java.net.Socket createSocket(java.lang.String host, int port, int connectionTimeout) throws java.io.IOException
java.io.IOException
protected javax.net.ssl.SSLSocket createSSLSocket(java.lang.String host, int port, int connectionTimeout, boolean trustAll, boolean verifyHttpsHost) throws java.io.IOException
java.io.IOException
protected javax.net.ssl.SSLSocketFactory getDefaultSSLSocketFactory(boolean trustAllCertificates) throws java.io.IOException
java.io.IOException
protected javax.net.SocketFactory resolveSocketFactory(ProxyInfo proxy, boolean ssl, boolean trustAllCertificates, int connectionTimeout) throws java.io.IOException
java.io.IOException
Copyright © 2003-present Jodd Team