Record Class ProxyHostStatus

java.lang.Object
java.lang.Record
ecmwf.ecpds.master.ProxyHostStatus
Record Components:
name - the Proxy Host's own name
address - the Proxy Host's own address (HOS_HOST)
connected - whether its Continental Mover is currently connected to the MasterServer (see ManagementInterface.getActiveProxyHostNames()), resolved via that Host's proxy.root option (see ECtransOptions#HOST_PROXY_ROOT)
root - this Host's own proxy.root option value, or blank/null if left unconfigured
latitude - this Proxy Host's own resolved latitude, or null if unresolved
longitude - this Proxy Host's own resolved longitude, or null if unresolved
nickname - the Proxy Host's display nickname (HOS_NICKNAME)
All Implemented Interfaces:
Serializable

public record ProxyHostStatus(String name, String address, boolean connected, String root, Double latitude, Double longitude, String nickname) extends Record implements Serializable
One enabled Proxy-type Host, for the "Live ECPDS Earth" globe's Continental Mover marker - sent regardless of whether its Continental Mover is currently connected, so every configured one gets a marker (dimmed when not connected, see globe.jsp's upsertMover()), not only the ones currently relaying traffic.

latitude/longitude are resolved once, server-side, by ManagementImpl#getEnabledProxyHosts() itself (preferring this Host's own manually-stored location over a live GeoIP guess of its raw address - see ManagementImpl#_resolveProxyHostLocation), rather than left for the caller to re-resolve generically via ManagementInterface.getGeoLocations(String[]). That generic, address-keyed lookup has no way to tell a Proxy Host's own address apart from an ordinary target Host's address that merely failed to resolve, and could therefore end up resolving both to the same coincidental fallback location - resolving it here instead, directly from the actual Host object, avoids that ambiguity entirely. null when neither a stored location nor a live GeoIP lookup of the address succeeded.

See Also:
  • Constructor Details

    • ProxyHostStatus

      public ProxyHostStatus(String name, String address, boolean connected, String root, Double latitude, Double longitude, String nickname)
      Creates an instance of a ProxyHostStatus record class.
      Parameters:
      name - the value for the name record component
      address - the value for the address record component
      connected - the value for the connected record component
      root - the value for the root record component
      latitude - the value for the latitude record component
      longitude - the value for the longitude record component
      nickname - the value for the nickname record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • address

      public String address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • connected

      public boolean connected()
      Returns the value of the connected record component.
      Returns:
      the value of the connected record component
    • root

      public String root()
      Returns the value of the root record component.
      Returns:
      the value of the root record component
    • latitude

      public Double latitude()
      Returns the value of the latitude record component.
      Returns:
      the value of the latitude record component
    • longitude

      public Double longitude()
      Returns the value of the longitude record component.
      Returns:
      the value of the longitude record component
    • nickname

      public String nickname()
      Returns the value of the nickname record component.
      Returns:
      the value of the nickname record component