Class ServerToMachine

  • All Implemented Interfaces:
    java.util.function.Function<org.openstack4j.model.compute.Server,​Machine>

    public class ServerToMachine
    extends java.lang.Object
    implements java.util.function.Function<org.openstack4j.model.compute.Server,​Machine>
    Translates a Server from the OpenStack API to its Machine counterpart.
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerToMachine​(java.lang.String cloudProvider, java.lang.String region)
      Constructs a ServerToMachine conversion Function.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Machine apply​(org.openstack4j.model.compute.Server server)
      Converts a Server from the OpenStack API to its Machine representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • ServerToMachine

        public ServerToMachine​(java.lang.String cloudProvider,
                               java.lang.String region)
        Constructs a ServerToMachine conversion Function.
        Parameters:
        cloudProvider - The name of the cloud provider (for example, "OpenStack", "RackSpace", "CityCloud").
        The - region being connected to. For example, Kna1 or LON.
    • Method Detail

      • apply

        public Machine apply​(org.openstack4j.model.compute.Server server)
        Converts a Server from the OpenStack API to its Machine representation.
        Specified by:
        apply in interface java.util.function.Function<org.openstack4j.model.compute.Server,​Machine>
        Parameters:
        server - The Server representation.
        Returns:
        The corresponding Machine representation.