Class GetServerRequest

  • All Implemented Interfaces:
    java.util.concurrent.Callable<org.openstack4j.model.compute.Server>

    public class GetServerRequest
    extends AbstractOpenstackRequest<org.openstack4j.model.compute.Server>
    A request that, when called, requests meta data about a particular Server.
    • Constructor Summary

      Constructors 
      Constructor Description
      GetServerRequest​(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, java.lang.String serverId)
      Creates a new GetServerRequest.
    • Constructor Detail

      • GetServerRequest

        public GetServerRequest​(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory,
                                java.lang.String serverId)
        Creates a new GetServerRequest.
        Parameters:
        clientFactory - OpenStack API client factory.
        serverId - The id of the server to get.
    • Method Detail

      • doRequest

        public org.openstack4j.model.compute.Server doRequest​(org.openstack4j.api.OSClient api)
                                                       throws NotFoundException,
                                                              org.openstack4j.api.exceptions.ResponseException
        Description copied from class: AbstractOpenstackRequest
        Carries out the request and returns the response.
        Specified by:
        doRequest in class AbstractOpenstackRequest<org.openstack4j.model.compute.Server>
        Parameters:
        api - An authenticated OpenStack API client that is instructed to operate against the configured region.
        Returns:
        The response.
        Throws:
        org.openstack4j.api.exceptions.ResponseException - if the request failed.
        NotFoundException