Class OriginName
The target
represents the string used to look up the origin during name resolution. Currently, this is
a VIP
, which is passed to a Eureka name resolved. In the future, other targets will be supported, such as
DNS.
The authority
represents who we plan to connect to. In the case of TLS / SSL connections, this can be
used to verify the remote endpoint. It is not specified what the format is, but it may not be null. In the case
of VIPs, which are frequently used with AWS clusters, this is the Application Name.
The NIWS Client Name
is a legacy construct, which is used to configure an origin. When the origin is
created, the NIWS client name can be used as a key into a configuration mapping to decide how the Origin should
behave. By default, the VIP is the same for the NIWS client name, but it can be different in scenarios where
multiple connections to the same origin are needed. Additionally, the NIWS client name also functions as a key
in metrics.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static OriginName
Deprecated.static OriginName
Deprecated.static OriginName
fromVipAndApp
(String vip, String appName) Constructs an OriginName with a target and authority from the vip and app name.static OriginName
fromVipAndApp
(String vip, String appName, String niwsClientName) Constructs an OriginName with a target, authority, and NIWS client name.Returns the Authority of this origin.Returns the identifier for this this metric name.Returns the niwsClientName.This is typically the VIP for the given Origin.int
hashCode()
toString()
-
Method Details
-
fromVip
Deprecated. -
fromVip
Deprecated. -
fromVipAndApp
Constructs an OriginName with a target and authority from the vip and app name. The vip is used as the NIWS client name, which is frequently used for configuration. -
fromVipAndApp
Constructs an OriginName with a target, authority, and NIWS client name. The NIWS client name can be different from the vip in cases where custom configuration for an Origin is needed. -
getTarget
This is typically the VIP for the given Origin. -
getNiwsClientName
Returns the niwsClientName. This is normally used for interaction with NIWS, and should be used without prior knowledge that the value will be used in NIWS libraries. -
getMetricId
Returns the identifier for this this metric name. This may be different than any of the other fields; currently it is equivalent to the lowercasedgetNiwsClientName()
. -
getAuthority
Returns the Authority of this origin. This is used for establishing secure connections. May be absent if the authority is not trusted. -
equals
-
hashCode
public int hashCode() -
toString
-
fromVipAndApp(String, String)