com.elastisys.scale.cloudpool.openstack.requests

## Class GetServerRequest

- java.lang.Object
- - com.elastisys.scale.cloudpool.openstack.requests.AbstractOpenstackRequest<org.openstack4j.model.compute.Server>
  - - com.elastisys.scale.cloudpool.openstack.requests.GetServerRequest

All Implemented Interfaces:
  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` instance.

If the requested `Server` cannot be found, an `IllegalArgumentException` is raised.

### Constructor Summary

Constructors
Constructor and Description
`GetServerRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, String serverId)` Creates a new `GetServerRequest`.

### Method Summary

All Methods Instance Methods Concrete Methods
`org.openstack4j.model.compute.Server` `doRequest(org.openstack4j.api.OSClient api)` Carries out the request and returns the response.

### Methods inherited from class com.elastisys.scale.cloudpool.openstack.requests.AbstractOpenstackRequest

`call, getApiAccessConfig, getClientFactory`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GetServerRequest

    public GetServerRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory,
                            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

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:
  `NotFoundException`