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
neededNoSuchAlgorithmException
KeyManagementException
IOException
UnknownHostException
ConnectException
CertificateException
KeyStoreException
UnrecoverableKeyException
IllegalArgumentException
public Socket connect(URL url) throws NoSuchAlgorithmException, KeyManagementException, ConnectException, UnknownHostException, IOException, URISyntaxException, KeyStoreException, CertificateException, IllegalArgumentException, UnrecoverableKeyException
url
- The URL to connect toNoSuchAlgorithmException
KeyManagementException
IOException
UnknownHostException
ConnectException
URISyntaxException
UnrecoverableKeyException
CertificateException
KeyStoreException
UnrecoverableKeyException
IllegalArgumentException
public String getProtocol() throws URISyntaxException, KeyManagementException, NoSuchAlgorithmException, UnknownHostException, KeyStoreException, CertificateException, IllegalArgumentException, UnrecoverableKeyException, IOException, JUploadException
URISyntaxException
IOException
UnrecoverableKeyException
IllegalArgumentException
CertificateException
KeyStoreException
UnknownHostException
NoSuchAlgorithmException
KeyManagementException
JUploadException
Copyright © 2015. All rights reserved.