Class HostResource


  • public final class HostResource
    extends java.lang.Object
    Helper class for Host Resource. A host is defined as a general computing instance.
    Since:
    0.20
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String HOSTNAME_KEY
      Key for the hostname of the host.
      static java.lang.String ID_KEY
      Key for the unique host id (instance id in Cloud).
      static java.lang.String NAME_KEY
      Key for the name of the host.
      static java.lang.String TYPE
      The type of this Resource.
      static java.lang.String TYPE_KEY
      Key for the type of the host (machine type).
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private HostResource()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Resource create​(java.lang.String hostname, java.lang.String name, java.lang.String id, java.lang.String type)
      Returns a Resource that describes a k8s container.
      (package private) static Resource detect()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TYPE

        public static final java.lang.String TYPE
        The type of this Resource.
        Since:
        0.20
        See Also:
        Constant Field Values
      • HOSTNAME_KEY

        public static final java.lang.String HOSTNAME_KEY
        Key for the hostname of the host.

        It contains what the `hostname` command returns on the host machine.

        Since:
        0.20
        See Also:
        Constant Field Values
      • NAME_KEY

        public static final java.lang.String NAME_KEY
        Key for the name of the host.

        It may contain what `hostname` returns on Unix systems, the fully qualified, or a name specified by the user.

        Since:
        0.20
        See Also:
        Constant Field Values
      • ID_KEY

        public static final java.lang.String ID_KEY
        Key for the unique host id (instance id in Cloud).
        Since:
        0.20
        See Also:
        Constant Field Values
      • TYPE_KEY

        public static final java.lang.String TYPE_KEY
        Key for the type of the host (machine type).
        Since:
        0.20
        See Also:
        Constant Field Values
    • Constructor Detail

      • HostResource

        private HostResource()
    • Method Detail

      • create

        public static Resource create​(java.lang.String hostname,
                                      java.lang.String name,
                                      java.lang.String id,
                                      java.lang.String type)
        Returns a Resource that describes a k8s container.
        Parameters:
        hostname - the hostname of the host.
        name - the name of the host.
        id - the unique host id (instance id in Cloud).
        type - the type of the host (machine type).
        Returns:
        a Resource that describes a k8s container.
        Since:
        0.20