public class SetServiceStateRequest extends CloudAdapterRequest<Void>
Callable request that will execute
POST /pool/<instance>/serviceState against a cloud adapter.| Constructor and Description |
|---|
SetServiceStateRequest(PrioritizedCloudAdapter cloudAdapter,
String machineId,
ServiceState serviceState) |
| Modifier and Type | Method and Description |
|---|---|
Void |
execute(com.elastisys.scale.commons.net.http.client.AuthenticatedHttpClient client)
Execute the request against the remote cloud adapter using a HTTP client
set up according to the authentication mechanisms specified for the
PrioritizedCloudAdapter. |
call, urlpublic SetServiceStateRequest(PrioritizedCloudAdapter cloudAdapter, String machineId, ServiceState serviceState)
public Void execute(com.elastisys.scale.commons.net.http.client.AuthenticatedHttpClient client) throws Exception
CloudAdapterRequestPrioritizedCloudAdapter.
Sub-classes may want to use the CloudAdapterRequest.url(String) method to construct
URLs to reach the cloud adapter.
Note: this method is free to throw any kind of exception and does not
need to wrap them in a CloudAdapterException. The parent class
will take care of that.execute in class CloudAdapterRequest<Void>client - A http client set up according to the specified authentication
credentials in the PrioritizedCloudAdapter.Exception - on error to complete the request.Copyright © 2011–2015 elastisys. All rights reserved.