public class UriInfo extends Object
UriInfo class is used to represent a complex URI structure where
there can be both a plaintext and SSL URI. This is used in cases where the
alert definition needs a way to expose which URL (http or https) should be
used to gather data. Currently, only MetricSource uses this, but it
can be swapped out in other source types where a plain string is used for the
URI.| Modifier and Type | Class and Description |
|---|---|
class |
UriInfo.HighAvailability
The
UriInfo.HighAvailability structure is used to hold information about
how HA URIs are constructed if the service supports HA mode. |
| Constructor and Description |
|---|
UriInfo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Set<Integer> |
getAcceptableCodes() |
int |
getConnectionTimeoutMsec() |
Number |
getDefaultPort()
Gets the default port to use on the host running the alert if none of the
http properties are available.
|
UriInfo.HighAvailability |
getHighAvailability()
Gets the HA structure to use when determining if the component is in HA
mode and requires the URL to be built dynamically.
|
String |
getHttpsProperty()
The configuration property that can be used to determine if the secure URL
should be used.
|
String |
getHttpsPropertyValue()
The literal value to use when comparing to the result from
getHttpsProperty(). |
String |
getHttpsUri()
Gets the secure (HTTPS) URI that can be used to retrieve alert information.
|
String |
getHttpUri()
Gets the plaintext (HTTP) URI that can be used to retrieve alert
information.
|
String |
getKerberosKeytab()
The configuration property with kerberos keytab path.
|
String |
getKerberosPrincipal()
The configuration property with kerberos principal name.
|
int |
getReadTimeoutMsec() |
int |
hashCode() |
URI |
resolve(Map<String,Map<String,String>> config) |
void |
setAcceptableCodes(Set<Integer> m_acceptableCodes) |
void |
setHttpsProperty(String m_httpsProperty) |
void |
setHttpsPropertyValue(String m_httpsPropertyValue) |
void |
setHttpsUri(String httpsUri) |
void |
setHttpUri(String httpUri)
Sets the plaintext (HTTP) URI that can be used to retrieve alert
information.
|
public String getHttpUri()
null to always use the secure URL).public void setHttpUri(String httpUri)
httpUri - the plaintext URI or null for none.public void setHttpsUri(String httpsUri)
public void setHttpsPropertyValue(String m_httpsPropertyValue)
public void setHttpsProperty(String m_httpsProperty)
public Number getDefaultPort()
public String getHttpsUri()
null to always use the insecure
URL).public String getHttpsProperty()
null for
none.public String getHttpsPropertyValue()
getHttpsProperty().null for none.public String getKerberosKeytab()
null for none.public String getKerberosPrincipal()
null for none.public UriInfo.HighAvailability getHighAvailability()
null if the component does not support
HA mode.public URI resolve(Map<String,Map<String,String>> config) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariExceptionpublic int getConnectionTimeoutMsec()
public int getReadTimeoutMsec()
Copyright © 2022 Apache Software Foundation. All rights reserved.