public final class HttpConnectorAddress extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpConnectorAddress.BasicHostnameVerifier |
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHORIZATION_KEY |
| Constructor and Description |
|---|
HttpConnectorAddress() |
HttpConnectorAddress(String host,
int port) |
HttpConnectorAddress(String host,
int port,
boolean secure)
construct an address which indicates the host, port and
security attributes desired.
|
HttpConnectorAddress(String host,
int port,
boolean secure,
String path) |
HttpConnectorAddress(String host,
int port,
boolean secure,
String path,
SSLSocketFactory sslSocketFactory) |
HttpConnectorAddress(String host,
int port,
SSLSocketFactory sslSocketFactory) |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationInfo |
getAuthenticationInfo() |
String |
getBasicAuthString() |
String |
getConnectorType()
get the protocol prefix to be used for a connection for the
receiver
|
String |
getHost() |
String |
getPath() |
int |
getPort() |
SSLSocketFactory |
getSSLSocketFactory() |
boolean |
isSecure()
Indicate if the receiver represents a secure address
|
URLConnection |
openConnection(String path)
Open a connection using the reciever and the given path
|
void |
setAuthenticationInfo(AuthenticationInfo authInfo) |
void |
setHost(String host) |
void |
setInteractive(boolean mode)
Set the interactive mode for the connection.
|
void |
setPath(String path) |
void |
setPort(int port) |
void |
setSecure(boolean secure)
Set the security attribute
|
URL |
toURL(String path) |
public static final String AUTHORIZATION_KEY
public HttpConnectorAddress()
public HttpConnectorAddress(String host, int port)
public HttpConnectorAddress(String host, int port, boolean secure)
host - a host addressport - a port numbersecure - a boolean indication of whether the connection should be
secure (i.e. confidential) or notpublic HttpConnectorAddress(String host, int port, boolean secure, String path)
public HttpConnectorAddress(String host, int port, SSLSocketFactory sslSocketFactory)
public HttpConnectorAddress(String host, int port, boolean secure, String path, SSLSocketFactory sslSocketFactory)
public URLConnection openConnection(String path) throws IOException
path - the path to the required resource (path here is
the portion after the hostname:port portion of a URL)URLConnection including
HttpsURLConnection. If the sub-class is a
HttpsURLConnection then this connection will
accept any certificate from any server where the server's
name matches the host name of this object. Specifically we
allows the certificate not to contain the name of
the server. This is a potential security hole, but is also a
usability enhancement.IOException - if there's a problem in connecting to the
resourcepublic String getConnectorType()
http or
https depending upon the security setting.public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public String getPath()
public void setPath(String path)
public AuthenticationInfo getAuthenticationInfo()
public void setAuthenticationInfo(AuthenticationInfo authInfo)
public void setSecure(boolean secure)
public boolean isSecure()
public void setInteractive(boolean mode)
public URL toURL(String path) throws MalformedURLException
MalformedURLExceptionpublic SSLSocketFactory getSSLSocketFactory()
public final String getBasicAuthString()
Copyright © 2017. All rights reserved.