Class ServerExistsRequest
- java.lang.Object
-
- com.elastisys.scale.cloudpool.openstack.requests.AbstractOpenstackRequest<java.lang.Boolean>
-
- com.elastisys.scale.cloudpool.openstack.requests.ServerExistsRequest
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Boolean>
public class ServerExistsRequest extends AbstractOpenstackRequest<java.lang.Boolean>
A request that, when called, determines if a particularServerexists.
-
-
Constructor Summary
Constructors Constructor Description ServerExistsRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, java.lang.String serverId)Creates a newServerExistsRequest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleandoRequest(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
-
-
-
-
Constructor Detail
-
ServerExistsRequest
public ServerExistsRequest(com.elastisys.scale.commons.openstack.OSClientFactory clientFactory, java.lang.String serverId)Creates a newServerExistsRequest.- Parameters:
clientFactory- OpenStack API client factory.serverId- The server whose existence is to be queried.
-
-
Method Detail
-
doRequest
public java.lang.Boolean doRequest(org.openstack4j.api.OSClient api) throws org.openstack4j.api.exceptions.ResponseExceptionDescription copied from class:AbstractOpenstackRequestCarries out the request and returns the response.- Specified by:
doRequestin classAbstractOpenstackRequest<java.lang.Boolean>- 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.
-
-