public class HttpConnect extends Object
| Constructor and Description |
|---|
HttpConnect(UploadPolicy policy)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Socket |
connect(URL url)
Connects to a given URL automatically using a proxy.
|
Socket |
connect(URL url,
Proxy proxy)
Connects to a given URL.
|
String |
getProtocol()
Retrieve the protocol to be used for the postURL of the current policy.
|
public HttpConnect(UploadPolicy policy)
policy - The UploadPolicy to be used for logging.public Socket connect(URL url, Proxy proxy) throws NoSuchAlgorithmException, KeyManagementException, ConnectException, UnknownHostException, IOException, KeyStoreException, CertificateException, IllegalArgumentException, UnrecoverableKeyException
url - The URL to connect toproxy - The proxy to be used, may be null if direct connection is
neededNoSuchAlgorithmExceptionKeyManagementExceptionIOExceptionUnknownHostExceptionConnectExceptionCertificateExceptionKeyStoreExceptionUnrecoverableKeyExceptionIllegalArgumentExceptionpublic Socket connect(URL url) throws NoSuchAlgorithmException, KeyManagementException, ConnectException, UnknownHostException, IOException, URISyntaxException, KeyStoreException, CertificateException, IllegalArgumentException, UnrecoverableKeyException
url - The URL to connect toNoSuchAlgorithmExceptionKeyManagementExceptionIOExceptionUnknownHostExceptionConnectExceptionURISyntaxExceptionUnrecoverableKeyExceptionCertificateExceptionKeyStoreExceptionUnrecoverableKeyExceptionIllegalArgumentExceptionpublic String getProtocol() throws URISyntaxException, KeyManagementException, NoSuchAlgorithmException, UnknownHostException, KeyStoreException, CertificateException, IllegalArgumentException, UnrecoverableKeyException, IOException, JUploadException
URISyntaxExceptionIOExceptionUnrecoverableKeyExceptionIllegalArgumentExceptionCertificateExceptionKeyStoreExceptionUnknownHostExceptionNoSuchAlgorithmExceptionKeyManagementExceptionJUploadExceptionCopyright © 2015. All rights reserved.