T - The response type.public abstract class CloudAdapterRequest<T> extends Object implements Callable<T>
HttpRequestFactory.HttpRequestFactory| Constructor and Description |
|---|
CloudAdapterRequest(PrioritizedCloudAdapter cloudAdapter)
Creates a
CloudAdapterRequest targeting a specific cloud adapter. |
| Modifier and Type | Method and Description |
|---|---|
T |
call() |
abstract T |
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. |
String |
url(String path)
Constructs a URL for a particular resource on the remote cloud adapter.
|
public CloudAdapterRequest(PrioritizedCloudAdapter cloudAdapter)
CloudAdapterRequest targeting a specific cloud adapter.cloudAdapter - The targeted cloud adapter.public String url(String path)
path - A resource path on the remote cloud adapter.public T call() throws CloudAdapterException
call in interface Callable<T>CloudAdapterExceptionpublic abstract T execute(com.elastisys.scale.commons.net.http.client.AuthenticatedHttpClient client) throws Exception
PrioritizedCloudAdapter.
Sub-classes may want to use the 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.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.