deprecated all top-level Async apis and clients

This commit is contained in:
adriancole 2013-04-09 00:40:19 -07:00
parent 36dd831b84
commit 053197fe61
92 changed files with 451 additions and 210 deletions

View File

@ -28,7 +28,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.atmos.blobstore.config.AtmosBlobStoreContextModule;
import org.jclouds.atmos.config.AtmosRestClientModule;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -42,7 +41,12 @@ import com.google.inject.Module;
*/
public class AtmosApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<AtmosClient, AtmosAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<AtmosClient, AtmosAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(AtmosClient.class)} as
* {@link AtmosAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<AtmosClient, AtmosAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<AtmosClient, AtmosAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -71,6 +75,7 @@ public class AtmosApiMetadata extends BaseRestApiMetadata {
}
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(AtmosClient.class, AtmosAsyncClient.class);
id("atmos")

View File

@ -75,7 +75,11 @@ import com.google.inject.Provides;
* @see AtmosClient
* @see <a href="https://community.emc.com/community/labs/atmos_online" />
* @author Adrian Cole
*
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(AtmosClient.class)} as
* {@link AtmosAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(SignRequest.class)
@Path("/rest/namespace")
public interface AtmosAsyncClient extends Closeable {

View File

@ -29,7 +29,6 @@ import org.jclouds.cloudfiles.config.CloudFilesRestClientModule.StorageAndCDNMan
import org.jclouds.openstack.swift.SwiftApiMetadata;
import org.jclouds.openstack.swift.blobstore.SwiftBlobSigner;
import org.jclouds.openstack.swift.blobstore.config.TemporaryUrlExtensionModule;
import org.jclouds.rest.RestContext;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
@ -43,7 +42,12 @@ import com.google.inject.TypeLiteral;
*/
public class CloudFilesApiMetadata extends SwiftApiMetadata {
public static final TypeToken<RestContext<CloudFilesClient, CloudFilesAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<CloudFilesClient, CloudFilesAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudFilesClient.class)} as
* {@link CloudFilesAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<CloudFilesClient, CloudFilesAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<CloudFilesClient, CloudFilesAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -66,6 +70,7 @@ public class CloudFilesApiMetadata extends SwiftApiMetadata {
}
public static class Builder extends SwiftApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder(){
super(CloudFilesClient.class, CloudFilesAsyncClient.class);
id("cloudfiles")

View File

@ -64,7 +64,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* @see CloudFilesClient
* @see <a href="http://www.rackspacecloud.com/cf-devguide-20090812.pdf" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudFilesClient.class)} as
* {@link CloudFilesAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(AuthenticateRequest.class)
@Endpoint(Storage.class)
public interface CloudFilesAsyncClient extends SwiftAsyncClient {

View File

@ -27,7 +27,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.cloudservers.compute.config.CloudServersComputeServiceContextModule;
import org.jclouds.cloudservers.config.CloudServersRestClientModule;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -41,7 +40,12 @@ import com.google.inject.Module;
*/
public class CloudServersApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<CloudServersClient, CloudServersAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<CloudServersClient, CloudServersAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudServersClient.class)} as
* {@link CloudServersAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<CloudServersClient, CloudServersAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<CloudServersClient, CloudServersAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -65,6 +69,7 @@ public class CloudServersApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(CloudServersClient.class, CloudServersAsyncClient.class);
id("cloudservers")

View File

@ -74,7 +74,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* @see CloudServersClient
* @see <a href="http://docs.rackspacecloud.com/servers/api/cs-devguide-latest.pdf" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudServersClient.class)} as
* {@link CloudServersAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters({ AuthenticateRequest.class, AddTimestampQuery.class })
@Endpoint(Compute.class)
public interface CloudServersAsyncClient extends Closeable {

View File

@ -28,7 +28,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.cloudsigma.compute.config.CloudSigmaComputeServiceContextModule;
import org.jclouds.cloudsigma.config.CloudSigmaRestClientModule;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -42,7 +41,12 @@ import com.google.inject.Module;
*/
public class CloudSigmaApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<CloudSigmaClient, CloudSigmaAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<CloudSigmaClient, CloudSigmaAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudSigmaClient.class)} as
* {@link CloudSigmaAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<CloudSigmaClient, CloudSigmaAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<CloudSigmaClient, CloudSigmaAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -72,6 +76,7 @@ public class CloudSigmaApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(CloudSigmaClient.class, CloudSigmaAsyncClient.class);
id("cloudsigma")

View File

@ -73,7 +73,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* @see CloudSigmaClient
* @see <a href="http://cloudsigma.com/en/platform-details/the-api" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudSigmaClient.class)} as
* {@link CloudSigmaAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(BasicAuthentication.class)
@Consumes(MediaType.TEXT_PLAIN)
public interface CloudSigmaAsyncClient extends Closeable {

View File

@ -26,7 +26,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.cloudstack.compute.config.CloudStackComputeServiceContextModule;
import org.jclouds.cloudstack.config.CloudStackParserModule;
import org.jclouds.cloudstack.config.CloudStackRestClientModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -39,7 +38,12 @@ import com.google.inject.Module;
*/
public class CloudStackApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<CloudStackClient, CloudStackAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<CloudStackClient, CloudStackAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudStackClient.class)} as
* {@link CloudStackAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<CloudStackClient, CloudStackAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<CloudStackClient, CloudStackAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -65,6 +69,7 @@ public class CloudStackApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(CloudStackClient.class, CloudStackAsyncClient.class);
id("cloudstack")

View File

@ -50,7 +50,10 @@ import org.jclouds.rest.annotations.Delegate;
* @author Adrian Cole
* @see CloudStackClient
* @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudStackClient.class)} as
* {@link CloudStackAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface CloudStackAsyncClient {
/**

View File

@ -33,7 +33,10 @@ import org.jclouds.rest.annotations.Delegate;
* @see <a href=
* "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html"
* />
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudStackDomainClient.class)} as
* {@link CloudStackDomainAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface CloudStackDomainAsyncClient extends CloudStackAsyncClient {
/**

View File

@ -38,11 +38,14 @@ import org.jclouds.rest.annotations.Delegate;
* <p/>
*
* @author Adrian Cole
* @see CloudStackDomainClient
* @see CloudStackGlobalClient
* @see <a href=
* "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
* />
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudStackGlobalClient.class)} as
* {@link CloudStackGlobalAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface CloudStackGlobalAsyncClient extends CloudStackDomainAsyncClient {
/**

View File

@ -26,7 +26,6 @@ import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.cloudwatch.config.CloudWatchRestClientModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.reflect.TypeToken;
@ -38,7 +37,12 @@ import com.google.common.reflect.TypeToken;
*/
public class CloudWatchApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<CloudWatchApi, CloudWatchAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<CloudWatchApi, CloudWatchAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudWatchApi.class)} as
* {@link CloudWatchAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<CloudWatchApi, CloudWatchAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<CloudWatchApi, CloudWatchAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -47,6 +51,7 @@ public class CloudWatchApiMetadata extends BaseRestApiMetadata {
return new Builder(getApi(), getAsyncApi()).fromApiMetadata(this);
}
@SuppressWarnings("deprecation")
public CloudWatchApiMetadata() {
this(new Builder(CloudWatchApi.class, CloudWatchAsyncApi.class));
}

View File

@ -38,7 +38,10 @@ import com.google.inject.Provides;
* href="http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference"
* />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudWatchApi.class)} as
* {@link CloudWatchAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface CloudWatchAsyncApi extends Closeable {
/**
*

View File

@ -34,7 +34,6 @@ import org.jclouds.ec2.compute.EC2ComputeServiceContext;
import org.jclouds.ec2.compute.config.EC2ComputeServiceContextModule;
import org.jclouds.ec2.compute.config.EC2ResolveImagesModule;
import org.jclouds.ec2.config.EC2RestClientModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -60,7 +59,12 @@ import com.google.inject.Module;
*/
public class EC2ApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<? extends EC2Client, ? extends EC2AsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<? extends EC2Client, ? extends EC2AsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(EC2Client.class)} as
* {@link EC2AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<? extends EC2Client, ? extends EC2AsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<? extends EC2Client, ? extends EC2AsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -90,6 +94,7 @@ public class EC2ApiMetadata extends BaseRestApiMetadata {
}
public static abstract class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
@SuppressWarnings("deprecation")
protected Builder() {
this(EC2Client.class, EC2AsyncClient.class);
}
@ -102,7 +107,7 @@ public class EC2ApiMetadata extends BaseRestApiMetadata {
.credentialName("Secret Access Key")
.defaultEndpoint("https://ec2.us-east-1.amazonaws.com")
.documentation(URI.create("http://docs.amazonwebservices.com/AWSEC2/latest/APIReference"))
.version(EC2AsyncClient.VERSION)
.version("2010-06-15")
.defaultProperties(EC2ApiMetadata.defaultProperties())
.context(CONTEXT_TOKEN)
.view(EC2ComputeServiceContext.class)

View File

@ -32,9 +32,11 @@ import org.jclouds.rest.annotations.Delegate;
* Provides asynchronous access to EC2 services.
*
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(EC2Client.class)} as
* {@link EC2AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface EC2AsyncClient extends EC2AsyncApi {
public static final String VERSION = "2010-06-15";
/**
* Provides asynchronous access to AMI services.

View File

@ -28,7 +28,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.elasticstack.compute.config.ElasticStackComputeServiceContextModule;
import org.jclouds.elasticstack.config.ElasticStackRestClientModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -42,7 +41,12 @@ import com.google.inject.Module;
*/
public class ElasticStackApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<ElasticStackClient, ElasticStackAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<ElasticStackClient, ElasticStackAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(ElasticStackClient.class)} as
* {@link ElasticStackAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<ElasticStackClient, ElasticStackAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<ElasticStackClient, ElasticStackAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -71,6 +75,7 @@ public class ElasticStackApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(ElasticStackClient.class, ElasticStackAsyncClient.class);
id("elasticstack")

View File

@ -62,7 +62,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* @see ElasticStackClient
* @see <a href="TODO: insert URL of provider documentation" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(ElasticStackClient.class)} as
* {@link ElasticStackAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(BasicAuthentication.class)
@Consumes(MediaType.TEXT_PLAIN)
public interface ElasticStackAsyncClient extends Closeable {

View File

@ -31,7 +31,6 @@ import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.ZoneModule;
import org.jclouds.openstack.v2_0.ServiceType;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -45,7 +44,12 @@ import com.google.inject.Module;
*/
public class CinderApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<CinderApi, CinderAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<CinderApi, CinderAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CinderApi.class)} as
* {@link CinderAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<CinderApi, CinderAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<CinderApi, CinderAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -71,6 +75,7 @@ public class CinderApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(CinderApi.class, CinderAsyncApi.class);
id("openstack-cinder")

View File

@ -39,7 +39,10 @@ import com.google.inject.Provides;
* @see CinderApi
* @see <a href="http://api.openstack.org/">API Doc</a>
* @author Everett Toews
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CinderApi.class)} as
* {@link CinderAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface CinderAsyncApi extends Closeable {
/**
* @return the Zone codes configured

View File

@ -30,7 +30,6 @@ import org.jclouds.openstack.keystone.v2_0.config.KeystoneParserModule;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneRestClientModule;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneRestClientModule.KeystoneAdminURLModule;
import org.jclouds.openstack.v2_0.ServiceType;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -44,7 +43,12 @@ import com.google.inject.Module;
*/
public class KeystoneApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<? extends KeystoneApi,? extends KeystoneAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<? extends KeystoneApi,? extends KeystoneAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(KeystoneApi.class)} as
* {@link KeystoneAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<KeystoneApi, KeystoneAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<KeystoneApi, KeystoneAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -69,6 +73,7 @@ public class KeystoneApiMetadata extends BaseRestApiMetadata {
}
public static abstract class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
@SuppressWarnings("deprecation")
protected Builder() {
this(KeystoneApi.class, KeystoneAsyncApi.class);
}

View File

@ -45,7 +45,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* @author Adam Lowe
* @see <a href="http://keystone.openstack.org/" />
* @see KeystoneApi
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(KeystoneApi.class)} as
* {@link KeystoneAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface KeystoneAsyncApi extends Closeable {
/**

View File

@ -36,8 +36,7 @@ import org.testng.annotations.Test;
public class ServiceApiLiveTest extends BaseKeystoneApiLiveTest {
public void testTenants() {
ServiceApi api = this.api.getServiceApi();
Set<? extends Tenant> result = api.listTenants();
Set<? extends Tenant> result = api.getServiceApi().listTenants();
assertNotNull(result);
assertFalse(result.isEmpty());

View File

@ -37,15 +37,15 @@ import org.testng.annotations.Test;
public class TenantApiLiveTest extends BaseKeystoneApiLiveTest {
public void testTenants() {
TenantApi api = this.api.getTenantApi().get();
Set<? extends Tenant> result = api.list().concat().toSet();
TenantApi tenantApi = api.getTenantApi().get();
Set<? extends Tenant> result = tenantApi.list().concat().toSet();
assertNotNull(result);
assertFalse(result.isEmpty());
for (Tenant tenant : result) {
assertNotNull(tenant.getId());
Tenant aTenant = api.get(tenant.getId());
Tenant aTenant = tenantApi.get(tenant.getId());
assertNotNull(aTenant, "get returned null for tenant: " + tenant);
assertEquals(aTenant, tenant);
@ -54,10 +54,10 @@ public class TenantApiLiveTest extends BaseKeystoneApiLiveTest {
public void testTenantsByName() {
TenantApi api = this.api.getTenantApi().get();
TenantApi tenantApi = api.getTenantApi().get();
for (Tenant tenant : api.list().concat()) {
Tenant aTenant = api.getByName(tenant.getName());
for (Tenant tenant : tenantApi.list().concat()) {
Tenant aTenant = tenantApi.getByName(tenant.getName());
assertNotNull(aTenant, "get returned null for tenant: " + tenant);
assertEquals(aTenant, tenant);

View File

@ -65,14 +65,14 @@ public class TokenApiLiveTest extends BaseKeystoneApiLiveTest {
public void testToken() {
TokenApi api = this.api.getTokenApi().get();
assertTrue(api.isValid(token));
Token result = api.get(token);
TokenApi tokenApi = api.getTokenApi().get();
assertTrue(tokenApi.isValid(token));
Token result = tokenApi.get(token);
assertNotNull(result);
assertEquals(result.getId(), token);
assertNotNull(result.getTenant());
User user = api.getUserOfToken(token);
User user = tokenApi.getUserOfToken(token);
assertNotNull(user);
assertNotNull(user.getId());
assertNotNull(user.getName());
@ -81,16 +81,16 @@ public class TokenApiLiveTest extends BaseKeystoneApiLiveTest {
public void testInvalidToken() {
TokenApi api = this.api.getTokenApi().get();
assertFalse(api.isValid("thisisnotarealtoken!"));
assertNull(api.get("thisisnotarealtoken!"));
TokenApi tokenApi = api.getTokenApi().get();
assertFalse(tokenApi.isValid("thisisnotarealtoken!"));
assertNull(tokenApi.get("thisisnotarealtoken!"));
}
public void testTokenEndpoints() {
TokenApi api = this.api.getTokenApi().get();
Set<? extends Endpoint> endpoints = api.listEndpointsForToken(token);
TokenApi tokenApi = api.getTokenApi().get();
Set<? extends Endpoint> endpoints = tokenApi.listEndpointsForToken(token);
assertNotNull(endpoints);
assertFalse(endpoints.isEmpty());
@ -98,8 +98,8 @@ public class TokenApiLiveTest extends BaseKeystoneApiLiveTest {
public void testInvalidTokenEndpoints() {
TokenApi api = this.api.getTokenApi().get();
assertTrue(api.listEndpointsForToken("thisisnotarealtoken!").isEmpty());
TokenApi tokenApi = api.getTokenApi().get();
assertTrue(tokenApi.listEndpointsForToken("thisisnotarealtoken!").isEmpty());
}
}

View File

@ -40,12 +40,12 @@ public class UserApiLiveTest extends BaseKeystoneApiLiveTest {
public void testUsers() {
UserApi api = this.api.getUserApi().get();
Set<? extends User> users = api.list().concat().toSet();
UserApi userApi = api.getUserApi().get();
Set<? extends User> users = userApi.list().concat().toSet();
assertNotNull(users);
assertFalse(users.isEmpty());
for (User user : users) {
User aUser = api.get(user.getId());
User aUser = userApi.get(user.getId());
assertEquals(aUser, user);
}
@ -53,12 +53,12 @@ public class UserApiLiveTest extends BaseKeystoneApiLiveTest {
public void testUserRolesOnTenant() {
UserApi api = this.api.getUserApi().get();
Set<? extends Tenant> tenants = this.api.getTenantApi().get().list().concat().toSet();
UserApi userApi = api.getUserApi().get();
Set<? extends Tenant> tenants = api.getTenantApi().get().list().concat().toSet();
for (User user : api.list().concat()) {
for (User user : userApi.list().concat()) {
for (Tenant tenant : tenants) {
Set<? extends Role> roles = api.listRolesOfUserOnTenant(user.getId(), tenant.getId());
Set<? extends Role> roles = userApi.listRolesOfUserOnTenant(user.getId(), tenant.getId());
for (Role role : roles) {
assertNotNull(role.getId());
}
@ -69,9 +69,9 @@ public class UserApiLiveTest extends BaseKeystoneApiLiveTest {
public void testListRolesOfUser() {
UserApi api = this.api.getUserApi().get();
for (User user : api.list().concat()) {
Set<? extends Role> roles = api.listRolesOfUser(user.getId());
UserApi userApi = api.getUserApi().get();
for (User user : userApi.list().concat()) {
Set<? extends Role> roles = userApi.listRolesOfUser(user.getId());
for (Role role : roles) {
assertNotNull(role.getId());
}
@ -81,9 +81,9 @@ public class UserApiLiveTest extends BaseKeystoneApiLiveTest {
public void testUsersByName() {
UserApi api = this.api.getUserApi().get();
for (User user : api.list().concat()) {
User aUser = api.getByName(user.getName());
UserApi userApi = api.getUserApi().get();
for (User user : userApi.list().concat()) {
User aUser = userApi.getByName(user.getName());
assertEquals(aUser, user);
}

View File

@ -33,7 +33,6 @@ import org.jclouds.ec2.compute.config.EC2ResolveImagesModule;
import org.jclouds.openstack.nova.ec2.config.HyphenToNullIso8601Module;
import org.jclouds.openstack.nova.ec2.config.NovaEC2ComputeServiceContextModule;
import org.jclouds.openstack.nova.ec2.config.NovaEC2RestClientModule;
import org.jclouds.rest.RestContext;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
@ -46,7 +45,12 @@ import com.google.inject.Module;
*/
public class NovaEC2ApiMetadata extends EC2ApiMetadata {
public static final TypeToken<RestContext<NovaEC2Client, NovaEC2AsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<NovaEC2Client, NovaEC2AsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(NovaEC2Client.class)} as
* {@link NovaEC2AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<NovaEC2Client, NovaEC2AsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<NovaEC2Client, NovaEC2AsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -81,6 +85,7 @@ public class NovaEC2ApiMetadata extends EC2ApiMetadata {
}
public static class Builder extends EC2ApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder(){
super(NovaEC2Client.class, NovaEC2AsyncClient.class);
id("openstack-nova-ec2")

View File

@ -26,7 +26,10 @@ import org.jclouds.rest.annotations.Delegate;
* Provides asynchronous access to EC2 services.
*
* @author Adam Lowe
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(NovaEC2Client.class)} as
* {@link NovaEC2AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface NovaEC2AsyncClient extends EC2AsyncClient {
/**
* {@inheritDoc}

View File

@ -38,7 +38,6 @@ import org.jclouds.openstack.nova.v2_0.compute.config.NovaComputeServiceContextM
import org.jclouds.openstack.nova.v2_0.config.NovaParserModule;
import org.jclouds.openstack.nova.v2_0.config.NovaRestClientModule;
import org.jclouds.openstack.v2_0.ServiceType;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -52,7 +51,12 @@ import com.google.inject.Module;
*/
public class NovaApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<NovaApi, NovaAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<NovaApi, NovaAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(NovaApi.class)} as
* {@link NovaAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<NovaApi, NovaAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<NovaApi, NovaAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -88,6 +92,7 @@ public class NovaApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(NovaApi.class, NovaAsyncApi.class);
id("openstack-nova")

View File

@ -57,7 +57,10 @@ import com.google.inject.Provides;
* @see <a href="http://docs.openstack.org/api/openstack-compute/1.1/content/"
* />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(NovaApi.class)} as
* {@link NovaAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface NovaAsyncApi extends Closeable {
/**

View File

@ -36,8 +36,8 @@ public class KeyPairApiLiveTest extends BaseNovaApiLiveTest {
public void testListKeyPairs() throws Exception {
for (String zoneId : api.getConfiguredZones()) {
KeyPairApi api = this.api.getKeyPairExtensionForZone(zoneId).get();
FluentIterable<? extends KeyPair> keyPairsList = api.list();
KeyPairApi keyPairApi = api.getKeyPairExtensionForZone(zoneId).get();
FluentIterable<? extends KeyPair> keyPairsList = keyPairApi.list();
assertNotNull(keyPairsList);
}
}
@ -45,14 +45,14 @@ public class KeyPairApiLiveTest extends BaseNovaApiLiveTest {
public void testCreateAndDeleteKeyPair() throws Exception {
final String KEYPAIR_NAME = "testkp";
for (String zoneId : api.getConfiguredZones()) {
KeyPairApi api = this.api.getKeyPairExtensionForZone(zoneId).get();
KeyPairApi keyPairApi = api.getKeyPairExtensionForZone(zoneId).get();
KeyPair keyPair = null;
try {
keyPair = api.create(KEYPAIR_NAME);
keyPair = keyPairApi.create(KEYPAIR_NAME);
assertNotNull(keyPair);
} finally {
if (keyPair != null) {
api.delete(KEYPAIR_NAME);
keyPairApi.delete(KEYPAIR_NAME);
}
}
}
@ -63,14 +63,14 @@ public class KeyPairApiLiveTest extends BaseNovaApiLiveTest {
final String PUBLIC_KEY = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCrrBREFxz3002l1HuXz0+UOdJQ/mOYD5DiJwwB/TOybwIKQJPOxJWA9gBoo4k9dthTKBTaEYbzrll7iZcp59E80S6mNiAr3mUgi+x5Y8uyXeJ2Ws+h6peVyFVUu9epkwpcTd1GVfdcVWsTajwDz9+lxCDhl0RZKDFoT0scTxbj/w== nova@nv-aw2az2-api0002";
for (String zoneId : api.getConfiguredZones()) {
KeyPairApi api = this.api.getKeyPairExtensionForZone(zoneId).get();
KeyPairApi keyPairApi = api.getKeyPairExtensionForZone(zoneId).get();
KeyPair keyPair = null;
try {
keyPair = api.createWithPublicKey(KEYPAIR_NAME, PUBLIC_KEY);
keyPair = keyPairApi.createWithPublicKey(KEYPAIR_NAME, PUBLIC_KEY);
assertNotNull(keyPair);
} finally {
if (keyPair != null) {
api.delete(KEYPAIR_NAME);
keyPairApi.delete(KEYPAIR_NAME);
}
}
}

View File

@ -43,27 +43,27 @@ public class SecurityGroupApiLiveTest extends BaseNovaApiLiveTest {
public void list() throws Exception {
for (String zoneId : api.getConfiguredZones()) {
SecurityGroupApi api = this.api.getSecurityGroupExtensionForZone(zoneId).get();
Set<? extends SecurityGroup> securityGroupsList = api.list().toSet();
SecurityGroupApi securityGroupApi = api.getSecurityGroupExtensionForZone(zoneId).get();
Set<? extends SecurityGroup> securityGroupsList = securityGroupApi.list().toSet();
assertNotNull(securityGroupsList);
}
}
public void createGetAndDeleteSecurityGroup() throws Exception {
for (String zoneId : api.getConfiguredZones()) {
SecurityGroupApi api = this.api.getSecurityGroupExtensionForZone(zoneId).get();
SecurityGroupApi securityGroupApi = api.getSecurityGroupExtensionForZone(zoneId).get();
SecurityGroup securityGroup = null;
String id;
try {
securityGroup = api
securityGroup = securityGroupApi
.createWithDescription(SECURITY_GROUP_NAME, "test security group");
assertNotNull(securityGroup);
id = securityGroup.getId();
SecurityGroup theGroup = api.get(id);
SecurityGroup theGroup = securityGroupApi.get(id);
assertNotNull(theGroup);
} finally {
if (securityGroup != null) {
api.delete(securityGroup.getId());
securityGroupApi.delete(securityGroup.getId());
}
}
}
@ -71,29 +71,29 @@ public class SecurityGroupApiLiveTest extends BaseNovaApiLiveTest {
public void createAndDeleteSecurityGroupRule() throws Exception {
for (String zoneId : api.getConfiguredZones()) {
SecurityGroupApi api = this.api.getSecurityGroupExtensionForZone(zoneId).get();
SecurityGroupApi securityGroupApi = api.getSecurityGroupExtensionForZone(zoneId).get();
SecurityGroup securityGroup = null;
try {
securityGroup = api.createWithDescription(SECURITY_GROUP_NAME, "test security group");
securityGroup = securityGroupApi.createWithDescription(SECURITY_GROUP_NAME, "test security group");
assertNotNull(securityGroup);
for (int port : ImmutableSet.of(22, 8080)) {
SecurityGroupRule rule = api.createRuleAllowingCidrBlock(securityGroup.getId(), Ingress
SecurityGroupRule rule = securityGroupApi.createRuleAllowingCidrBlock(securityGroup.getId(), Ingress
.builder().ipProtocol(IpProtocol.TCP).fromPort(port).toPort(port).build(), "0.0.0.0/0");
assertNotNull(rule);
SecurityGroupRule rule2 = api.createRuleAllowingSecurityGroupId(securityGroup.getId(),
SecurityGroupRule rule2 = securityGroupApi.createRuleAllowingSecurityGroupId(securityGroup.getId(),
Ingress.builder().ipProtocol(IpProtocol.TCP).fromPort(port).toPort(port).build(), securityGroup
.getId());
assertNotNull(rule2);
}
securityGroup = api.get(securityGroup.getId());
securityGroup = securityGroupApi.get(securityGroup.getId());
} finally {
if (securityGroup != null) {
api.delete(securityGroup.getId());
securityGroupApi.delete(securityGroup.getId());
}
}
}

View File

@ -45,8 +45,8 @@ public class ExtensionApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/extensions")
public void testListExtensions() throws Exception {
for (String zoneId : zones) {
ExtensionApi api = this.api.getExtensionApiForZone(zoneId);
Set<? extends Extension> response = api.list();
ExtensionApi extensionApi = api.getExtensionApiForZone(zoneId);
Set<? extends Extension> response = extensionApi.list();
assertNotNull(response);
assertFalse(response.isEmpty());
for (Extension extension : response) {
@ -68,10 +68,10 @@ public class ExtensionApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/extensions/{alias}", dependsOnMethods = { "testListExtensions" })
public void testGetExtensionByAlias() throws Exception {
for (String zoneId : zones) {
ExtensionApi api = this.api.getExtensionApiForZone(zoneId);
Set<? extends Extension> response = api.list();
ExtensionApi extensionApi = api.getExtensionApiForZone(zoneId);
Set<? extends Extension> response = extensionApi.list();
for (Extension extension : response) {
Extension details = api.get(extension.getId());
Extension details = extensionApi.get(extension.getId());
assertNotNull(details);
assertEquals(details.getId(), extension.getId());
assertEquals(details.getName(), extension.getName());

View File

@ -46,8 +46,8 @@ public class FlavorApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/flavors")
public void testListFlavors() throws Exception {
for (String zoneId : zones) {
FlavorApi api = this.api.getFlavorApiForZone(zoneId);
Set<? extends Resource> response = api.list().concat().toSet();
FlavorApi flavorApi = api.getFlavorApiForZone(zoneId);
Set<? extends Resource> response = flavorApi.list().concat().toSet();
assertNotNull(response);
assertFalse(response.isEmpty());
for (Resource flavor : response) {
@ -66,8 +66,8 @@ public class FlavorApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/flavors/detail")
public void testListFlavorsInDetail() throws Exception {
for (String zoneId : zones) {
FlavorApi api = this.api.getFlavorApiForZone(zoneId);
Set<? extends Flavor> response = api.listInDetail().concat().toSet();
FlavorApi flavorApi = api.getFlavorApiForZone(zoneId);
Set<? extends Flavor> response = flavorApi.listInDetail().concat().toSet();
assertNotNull(response);
assertFalse(response.isEmpty());
for (Flavor flavor : response) {
@ -89,10 +89,10 @@ public class FlavorApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/flavors/{id}", dependsOnMethods = { "testListFlavorsInDetail" })
public void testGetFlavorById() throws Exception {
for (String zoneId : zones) {
FlavorApi api = this.api.getFlavorApiForZone(zoneId);
Set<? extends Flavor> response = api.listInDetail().concat().toSet();
FlavorApi flavorApi = api.getFlavorApiForZone(zoneId);
Set<? extends Flavor> response = flavorApi.listInDetail().concat().toSet();
for (Flavor flavor : response) {
Flavor details = api.get(flavor.getId());
Flavor details = flavorApi.get(flavor.getId());
assertNotNull(details);
assertEquals(details.getId(), flavor.getId());
assertEquals(details.getName(), flavor.getName());

View File

@ -41,8 +41,8 @@ public class ImageApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/images")
public void testListImages() throws Exception {
for (String zoneId : zones) {
ImageApi api = this.api.getImageApiForZone(zoneId);
Set<? extends Resource> response = api.list().concat().toSet();
ImageApi imageApi = api.getImageApiForZone(zoneId);
Set<? extends Resource> response = imageApi.list().concat().toSet();
assertNotNull(response);
assertFalse(response.isEmpty());
for (Resource image : response) {
@ -56,8 +56,8 @@ public class ImageApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/images/detail")
public void testListImagesInDetail() throws Exception {
for (String zoneId : api.getConfiguredZones()) {
ImageApi api = this.api.getImageApiForZone(zoneId);
Set<? extends Image> response = api.listInDetail().concat().toSet();
ImageApi imageApi = api.getImageApiForZone(zoneId);
Set<? extends Image> response = imageApi.listInDetail().concat().toSet();
assertNotNull(response);
assertFalse(response.isEmpty());
for (Image image : response) {
@ -80,10 +80,10 @@ public class ImageApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/images/{id}", dependsOnMethods = { "testListImagesInDetail" })
public void testGetImageById() throws Exception {
for (String zoneId : api.getConfiguredZones()) {
ImageApi api = this.api.getImageApiForZone(zoneId);
Set<? extends Image> response = api.listInDetail().concat().toSet();
ImageApi imageApi = api.getImageApiForZone(zoneId);
Set<? extends Image> response = imageApi.listInDetail().concat().toSet();
for (Image image : response) {
Image details = api.get(image.getId());
Image details = imageApi.get(image.getId());
assertNotNull(details);
assertEquals(details.getId(), image.getId());
assertEquals(details.getName(), image.getName());

View File

@ -43,8 +43,8 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/servers")
public void testListServers() throws Exception {
for (String zoneId : zones) {
ServerApi api = this.api.getServerApiForZone(zoneId);
for (Resource server : api.list().concat()) {
ServerApi serverApi = api.getServerApiForZone(zoneId);
for (Resource server : serverApi.list().concat()) {
checkResource(server);
}
}
@ -53,8 +53,8 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/servers/detail")
public void testListServersInDetail() throws Exception {
for (String zoneId : zones) {
ServerApi api = this.api.getServerApiForZone(zoneId);
for (Server server : api.listInDetail().concat()) {
ServerApi serverApi = api.getServerApiForZone(zoneId);
for (Server server : serverApi.listInDetail().concat()) {
checkServer(server);
}
}
@ -63,9 +63,9 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest {
@Test(description = "GET /v${apiVersion}/{tenantId}/servers/{id}", dependsOnMethods = { "testListServersInDetail" })
public void testGetServerById() throws Exception {
for (String zoneId : zones) {
ServerApi api = this.api.getServerApiForZone(zoneId);
for (Resource server : api.list().concat()) {
Server details = api.get(server.getId());
ServerApi serverApi = api.getServerApiForZone(zoneId);
for (Resource server : serverApi.list().concat()) {
Server details = serverApi.get(server.getId());
assertEquals(details.getId(), server.getId());
assertEquals(details.getName(), server.getName());
assertEquals(details.getLinks(), server.getLinks());

View File

@ -62,10 +62,10 @@ public class BaseNovaApiLiveTest extends BaseApiLiveTest<NovaApi> {
super.setup();
zones = api.getConfiguredZones();
for (String zone : zones){
ServerApi api = this.api.getServerApiForZone(zone);
for (Resource server : api.list().concat()){
ServerApi serverApi = api.getServerApiForZone(zone);
for (Resource server : serverApi.list().concat()){
if (server.getName().equals(hostName))
api.delete(server.getId());
serverApi.delete(server.getId());
}
}
}

View File

@ -33,7 +33,6 @@ import org.jclouds.openstack.keystone.v2_0.config.KeystoneRestClientModule;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneRestClientModule.KeystoneAdminURLModule;
import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityAuthenticationModule;
import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
import org.jclouds.rest.RestContext;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
@ -46,7 +45,12 @@ import com.google.inject.Module;
*/
public class CloudIdentityApiMetadata extends KeystoneApiMetadata {
public static final TypeToken<RestContext<KeystoneApi, KeystoneAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<KeystoneApi, KeystoneAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(KeystoneApi.class)} as
* {@link KeystoneAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<KeystoneApi, KeystoneAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<KeystoneApi, KeystoneAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -70,6 +74,7 @@ public class CloudIdentityApiMetadata extends KeystoneApiMetadata {
}
public static class Builder extends KeystoneApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder(){
super(KeystoneApi.class, KeystoneAsyncApi.class);
id("rackspace-cloudidentity")

View File

@ -32,7 +32,6 @@ import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityAuthenticati
import org.jclouds.rackspace.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
import org.jclouds.rackspace.cloudloadbalancers.v1.config.CloudLoadBalancersRestClientModule;
import org.jclouds.rackspace.cloudloadbalancers.v1.loadbalancer.config.CloudLoadBalancersLoadBalancerContextModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -45,8 +44,12 @@ import com.google.inject.Module;
*/
public class CloudLoadBalancersApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<CloudLoadBalancersApi, CloudLoadBalancersAsyncApi>> CONTEXT_TOKEN =
new TypeToken<RestContext<CloudLoadBalancersApi, CloudLoadBalancersAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudLoadBalancersApi.class)} as
* {@link CloudLoadBalancersAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<CloudLoadBalancersApi, CloudLoadBalancersAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<CloudLoadBalancersApi, CloudLoadBalancersAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -72,6 +75,7 @@ public class CloudLoadBalancersApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(CloudLoadBalancersApi.class, CloudLoadBalancersAsyncApi.class);
id("rackspace-cloudloadbalancers")

View File

@ -49,7 +49,10 @@ import com.google.inject.Provides;
*
* @see CloudLoadBalancersApi
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudLoadBalancersApi.class)} as
* {@link CloudLoadBalancersAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface CloudLoadBalancersAsyncApi extends Closeable {
/**
* @return the Zone codes configured

View File

@ -25,7 +25,6 @@ import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import org.jclouds.route53.config.Route53RestClientModule;
@ -38,7 +37,12 @@ import com.google.common.reflect.TypeToken;
*/
public class Route53ApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<? extends Route53Api, ? extends Route53AsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<? extends Route53Api, ? extends Route53AsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(Route53Api.class)} as
* {@link Route53AsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<? extends Route53Api, ? extends Route53AsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<? extends Route53Api, ? extends Route53AsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -47,6 +51,7 @@ public class Route53ApiMetadata extends BaseRestApiMetadata {
return new Builder(getApi(), getAsyncApi()).fromApiMetadata(this);
}
@SuppressWarnings("deprecation")
public Route53ApiMetadata() {
this(new Builder(Route53Api.class, Route53AsyncApi.class));
}

View File

@ -46,7 +46,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* @see <a href="http://docs.amazonwebservices.com/Route53/latest/APIReference"
* />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(Route53Api.class)} as
* {@link Route53AsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(RestAuthentication.class)
@VirtualHost
@Path("/{jclouds.api-version}")

View File

@ -18,7 +18,6 @@
*/
package org.jclouds.s3;
import static org.jclouds.Constants.PROPERTY_API_VERSION;
import static org.jclouds.Constants.PROPERTY_RELAX_HOSTNAME;
import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG;
import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG;
@ -32,7 +31,6 @@ import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import org.jclouds.s3.blobstore.S3BlobStoreContext;
import org.jclouds.s3.blobstore.config.S3BlobStoreContextModule;
@ -62,7 +60,12 @@ import com.google.inject.Module;
*/
public class S3ApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<? extends S3Client,? extends S3AsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<? extends S3Client,? extends S3AsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildClient(S3Client.class)} as
* {@link S3AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<? extends S3Client, ? extends S3AsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<? extends S3Client, ? extends S3AsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -81,7 +84,6 @@ public class S3ApiMetadata extends BaseRestApiMetadata {
public static Properties defaultProperties() {
Properties properties = BaseRestApiMetadata.defaultProperties();
properties.setProperty(PROPERTY_API_VERSION, S3AsyncClient.VERSION);
properties.setProperty(PROPERTY_AUTH_TAG, "AWS");
properties.setProperty(PROPERTY_HEADER_TAG, S3Headers.DEFAULT_AMAZON_HEADERTAG);
properties.setProperty(PROPERTY_S3_SERVICE_PATH, "/");
@ -93,6 +95,7 @@ public class S3ApiMetadata extends BaseRestApiMetadata {
}
public static abstract class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
@SuppressWarnings("deprecation")
protected Builder() {
this(S3Client.class, S3AsyncClient.class);
}
@ -105,7 +108,7 @@ public class S3ApiMetadata extends BaseRestApiMetadata {
.credentialName("Secret Access Key")
.defaultEndpoint("https://s3.amazonaws.com")
.documentation(URI.create("http://docs.amazonwebservices.com/AmazonS3/latest/API"))
.version(S3AsyncClient.VERSION)
.version("2006-03-01")
.defaultProperties(S3ApiMetadata.defaultProperties())
.context(CONTEXT_TOKEN)
.view(typeToken(S3BlobStoreContext.class))

View File

@ -104,9 +104,13 @@ import com.google.inject.Provides;
*
* @author Adrian Cole
* @author James Murty
* @see S3Client
* @see AWSS3Client
* @see <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/RESTAPI.html" />
* @deprecated please use
* {@code org.jclouds.ContextBuilder#buildApi(S3Client.class)}
* as {@link S3AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(RequestAuthorizeSignature.class)
@BlobScope(CONTAINER)
public interface S3AsyncClient extends Closeable {

View File

@ -27,7 +27,6 @@ import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import org.jclouds.sqs.config.SQSRestClientModule;
@ -42,7 +41,12 @@ import com.google.inject.Module;
*/
public class SQSApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<SQSApi, SQSAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<SQSApi, SQSAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SQSApi.class)} as
* {@link SQSAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<SQSApi, SQSAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<SQSApi, SQSAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -51,6 +55,7 @@ public class SQSApiMetadata extends BaseRestApiMetadata {
return new Builder(getApi(), getAsyncApi()).fromApiMetadata(this);
}
@SuppressWarnings("deprecation")
public SQSApiMetadata() {
this(new Builder(SQSApi.class, SQSAsyncApi.class));
}

View File

@ -45,7 +45,10 @@ import com.google.inject.Provides;
* href="http://docs.amazonwebservices.com/AWSSimpleQueueService/2011-10-01/APIReference/Welcome.html">SQS
* documentation</a>
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SQSApi.class)} as
* {@link SQSAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
@Beta
@RequestFilters(FormSigner.class)
@VirtualHost

View File

@ -87,9 +87,9 @@ public class BulkMessageApiLiveTest extends BaseSQSApiLiveTest {
@Test(dependsOnMethods = "testSendMessages")
public void testChangeMessageVisibility() {
for (URI queue : queues) {
MessageApi api = this.api.getMessageApiForQueue(queue);
MessageApi messageApi = api.getMessageApiForQueue(queue);
Set<Message> messages = collectMessages(api);
Set<Message> messages = collectMessages(messageApi);
receiptHandles = Iterables.transform(messages, new Function<Message, String>() {
@Override
@ -99,14 +99,14 @@ public class BulkMessageApiLiveTest extends BaseSQSApiLiveTest {
});
// hidden message, so we can't see it
assertNull(api.receive());
assertNull(messageApi.receive());
// this should unhide it
BatchResult<String> acks = api.changeVisibility(receiptHandles, 0);
BatchResult<String> acks = messageApi.changeVisibility(receiptHandles, 0);
assertEquals(acks.size(), messages.size(), "error changing visibility " + acks);
// so we can see it again
assertEquals(collectMessages(api).size(), messages.size());
assertEquals(collectMessages(messageApi).size(), messages.size());
}
}

View File

@ -55,14 +55,14 @@ public class MessageApiLiveTest extends BaseSQSApiLiveTest {
public void testSendMessage() {
for (URI queue : queues) {
assertEquals(api.getMessageApiForQueue(queue).send(message).getMD5(), md5);
assertEquals(api(queue).send(message).getMD5(), md5);
}
}
@Test(dependsOnMethods = "testSendMessage")
public void testReceiveMessageWithoutHidingMessage() {
for (URI queue : queues) {
assertEquals(api.getMessageApiForQueue(queue).receive(attribute("All").visibilityTimeout(0)).getMD5(), md5);
assertEquals(api(queue).receive(attribute("All").visibilityTimeout(0)).getMD5(), md5);
}
}
@ -71,24 +71,27 @@ public class MessageApiLiveTest extends BaseSQSApiLiveTest {
@Test(dependsOnMethods = "testReceiveMessageWithoutHidingMessage")
public void testChangeMessageVisibility() {
for (URI queue : queues) {
MessageApi api = this.api.getMessageApiForQueue(queue);
MessageApi messageApi = api(queue);
// start hiding it at 5 seconds
receiptHandle = api.receive(attribute("None").visibilityTimeout(5)).getReceiptHandle();
receiptHandle = messageApi.receive(attribute("None").visibilityTimeout(5)).getReceiptHandle();
// hidden message, so we can't see it
assertNull(api.receive());
assertNull(messageApi.receive());
// this should unhide it
api.changeVisibility(receiptHandle, 0);
messageApi.changeVisibility(receiptHandle, 0);
// so we can see it again
assertEquals(api.receive(attribute("All").visibilityTimeout(0)).getMD5(), md5);
assertEquals(messageApi.receive(attribute("All").visibilityTimeout(0)).getMD5(), md5);
}
}
@Test(dependsOnMethods = "testChangeMessageVisibility")
public void testDeleteMessage() throws InterruptedException {
for (URI queue : queues) {
api.getMessageApiForQueue(queue).delete(receiptHandle);
api(queue).delete(receiptHandle);
assertNoMessages(queue);
}
}
private MessageApi api(URI queue) {
return api.getMessageApiForQueue(queue);
}
}

View File

@ -61,12 +61,12 @@ public class BaseSQSApiLiveTest extends BaseApiLiveTest<SQSApi> {
}
protected String recreateQueueInRegion(String queueName, String region) {
QueueApi api = this.api.getQueueApiForRegion(region);
URI result = api.get(queueName);
QueueApi queueApi = api.getQueueApiForRegion(region);
URI result = queueApi.get(queueName);
if (result != null) {
api.delete(result);
queueApi.delete(result);
}
URI queue = api.create(queueName);
URI queue = queueApi.create(queueName);
assertQueueInList(region, queue);
queues.add(queue);
return queueName;

View File

@ -25,7 +25,6 @@ import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import org.jclouds.sts.config.STSRestClientModule;
@ -38,7 +37,12 @@ import com.google.common.reflect.TypeToken;
*/
public class STSApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<? extends STSApi, ? extends STSAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<? extends STSApi, ? extends STSAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(STSApi.class)} as
* {@link STSAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<STSApi, STSAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<STSApi, STSAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -47,6 +51,7 @@ public class STSApiMetadata extends BaseRestApiMetadata {
return new Builder(getApi(), getAsyncApi()).fromApiMetadata(this);
}
@SuppressWarnings("deprecation")
public STSApiMetadata() {
this(new Builder(STSApi.class, STSAsyncApi.class));
}

View File

@ -46,7 +46,10 @@ import com.google.common.util.concurrent.ListenableFuture;
*
* @see <a href="http://docs.amazonwebservices.com/STS/latest/APIReference" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(STSApi.class)} as
* {@link STSAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(FormSigner.class)
@VirtualHost
public interface STSAsyncApi extends Closeable {

View File

@ -79,7 +79,10 @@ import com.google.inject.Provides;
* @see CommonSwiftClient
* @see <a href="http://www.rackspacecloud.com/cf-devguide-20090812.pdf" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CommonSwiftClient.class)} as
* {@link CommonSwiftAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface CommonSwiftAsyncClient extends Closeable {
@Provides
SwiftObject newSwiftObject();

View File

@ -32,7 +32,6 @@ import org.jclouds.openstack.swift.blobstore.config.SwiftBlobStoreContextModule;
import org.jclouds.openstack.swift.blobstore.config.TemporaryUrlExtensionModule.SwiftTemporaryUrlExtensionModule;
import org.jclouds.openstack.swift.config.SwiftRestClientModule;
import org.jclouds.openstack.swift.config.SwiftRestClientModule.StorageEndpointModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -46,7 +45,12 @@ import com.google.inject.Module;
*/
public class SwiftApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<? extends SwiftClient, ? extends SwiftAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<? extends SwiftClient, ? extends SwiftAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SwiftClient.class)} as
* {@link SwiftAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<? extends SwiftClient, ? extends SwiftAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<? extends SwiftClient, ? extends SwiftAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -75,6 +79,7 @@ public class SwiftApiMetadata extends BaseRestApiMetadata {
}
public static abstract class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
@SuppressWarnings("deprecation")
protected Builder() {
this(SwiftClient.class, SwiftAsyncClient.class);
}

View File

@ -26,7 +26,10 @@ import org.jclouds.rest.annotations.RequestFilters;
* Functionality that's in Swift, and not in CloudFiles.
*
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SwiftClient.class)} as
* {@link SwiftAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(AuthenticateRequest.class)
@Endpoint(Storage.class)
public interface SwiftAsyncClient extends CommonSwiftAsyncClient {

View File

@ -32,7 +32,6 @@ import org.jclouds.openstack.swift.blobstore.config.SwiftBlobStoreContextModule;
import org.jclouds.openstack.swift.blobstore.config.TemporaryUrlExtensionModule.SwiftKeystoneTemporaryUrlExtensionModule;
import org.jclouds.openstack.swift.config.SwiftKeystoneRestClientModule;
import org.jclouds.openstack.swift.config.SwiftRestClientModule.KeystoneStorageEndpointModule;
import org.jclouds.rest.RestContext;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
@ -45,7 +44,12 @@ import com.google.inject.Module;
*/
public class SwiftKeystoneApiMetadata extends SwiftApiMetadata {
public static final TypeToken<RestContext<SwiftKeystoneClient, SwiftKeystoneAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<SwiftKeystoneClient, SwiftKeystoneAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SwiftKeystoneClient.class)} as
* {@link SwiftKeystoneAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<SwiftKeystoneClient, SwiftKeystoneAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<SwiftKeystoneClient, SwiftKeystoneAsyncClient>>() {
private static final long serialVersionUID = 1L;
};

View File

@ -26,7 +26,10 @@ import org.jclouds.rest.annotations.RequestFilters;
* Functionality that's in Swift, and not in CloudFiles.
*
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SwiftKeystoneClient.class)} as
* {@link SwiftKeystoneAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(AuthenticateRequest.class)
@Endpoint(Storage.class)
public interface SwiftKeystoneAsyncClient extends SwiftAsyncClient {

View File

@ -31,7 +31,6 @@ import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import org.jclouds.vcloud.compute.config.VCloudComputeServiceContextModule;
import org.jclouds.vcloud.config.VCloudRestClientModule;
@ -48,7 +47,12 @@ import com.google.inject.Module;
*/
public class VCloudApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<VCloudClient, VCloudAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<VCloudClient, VCloudAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(VCloudClient.class)} as
* {@link VCloudAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<VCloudClient, VCloudAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<VCloudClient, VCloudAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -87,6 +91,7 @@ public class VCloudApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(VCloudClient.class, VCloudAsyncClient.class);
id("vcloud")

View File

@ -39,7 +39,10 @@ import org.jclouds.vcloud.filters.AddVCloudAuthorizationAndCookieToRequest;
* @see <a href= "https://community.vcloudexpress.terremark.com/en-us/discussion_forums/f/60.aspx"
* />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(VCloudClient.class)} as
* {@link VCloudAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
public interface VCloudAsyncClient extends Closeable {

View File

@ -32,7 +32,10 @@ import com.google.inject.ImplementedBy;
*
* @author Adrian Cole
*
* @deprecated please use {@link org.jclouds.ContextBuilder#buildApi()} as
* async interface will be removed in jclouds 1.7.
*/
@Deprecated
@ImplementedBy(RestContextImpl.class)
public interface RestContext<S, A> extends Context {
@ -40,7 +43,10 @@ public interface RestContext<S, A> extends Context {
* low-level api to the cloud. Threadsafe implementations will return a singleton.
*
* @return a connection to the cloud where all methods return {@link Future}s
* @deprecated please use {@link org.jclouds.ContextBuilder#buildApi()} as
* async interface will be removed in jclouds 1.7.
*/
@Deprecated
A getAsyncApi();
/**

View File

@ -39,7 +39,10 @@ import com.google.inject.TypeLiteral;
/**
* @author Adrian Cole
* @deprecated please use {@link org.jclouds.ContextBuilder#buildApi()} as
* async interface will be removed in jclouds 1.7.
*/
@Deprecated
@Singleton
public class RestContextImpl<S, A> extends ContextImpl implements RestContext<S, A> {

View File

@ -28,7 +28,6 @@ import org.jclouds.aws.ec2.compute.config.AWSEC2ComputeServiceContextModule;
import org.jclouds.aws.ec2.config.AWSEC2RestClientModule;
import org.jclouds.ec2.EC2ApiMetadata;
import org.jclouds.ec2.compute.config.EC2ResolveImagesModule;
import org.jclouds.rest.RestContext;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
@ -41,7 +40,12 @@ import com.google.inject.Module;
*/
public class AWSEC2ApiMetadata extends EC2ApiMetadata {
public static final TypeToken<RestContext<AWSEC2Client, AWSEC2AsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<AWSEC2Client, AWSEC2AsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(AWSEC2Client.class)} as
* {@link AWSEC2AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<AWSEC2Client, AWSEC2AsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<AWSEC2Client, AWSEC2AsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -69,10 +73,11 @@ public class AWSEC2ApiMetadata extends EC2ApiMetadata {
}
public static class Builder extends EC2ApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder(){
super(AWSEC2Client.class, AWSEC2AsyncClient.class);
id("aws-ec2")
.version(AWSEC2AsyncClient.VERSION)
.version("2012-06-01")
.name("Amazon-specific EC2 API")
.view(AWSEC2ComputeServiceContext.class)
.context(CONTEXT_TOKEN)

View File

@ -32,9 +32,13 @@ import org.jclouds.rest.annotations.Delegate;
* Provides asynchronous access to EC2 services.
*
* @author Adrian Cole
*
* @deprecated please use
* {@code org.jclouds.ContextBuilder#buildApi(AWSEC2Client.class)}
* as {@link AWSEC2AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface AWSEC2AsyncClient extends EC2AsyncClient {
public static final String VERSION = "2012-06-01";
/**
* {@inheritDoc}

View File

@ -26,7 +26,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.aws.s3.blobstore.AWSS3BlobStoreContext;
import org.jclouds.aws.s3.blobstore.config.AWSS3BlobStoreContextModule;
import org.jclouds.aws.s3.config.AWSS3RestClientModule;
import org.jclouds.rest.RestContext;
import org.jclouds.s3.S3ApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -40,7 +39,12 @@ import com.google.inject.Module;
*/
public class AWSS3ApiMetadata extends S3ApiMetadata {
public static final TypeToken<RestContext<AWSS3Client, AWSS3AsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<AWSS3Client, AWSS3AsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(AWSS3Client.class)} as
* {@link AWSS3AsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<AWSS3Client, AWSS3AsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<AWSS3Client, AWSS3AsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -63,6 +67,7 @@ public class AWSS3ApiMetadata extends S3ApiMetadata {
}
public static class Builder extends S3ApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder(){
super(AWSS3Client.class, AWSS3AsyncClient.class);
id("aws-s3")

View File

@ -66,6 +66,9 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides access to amazon-specific S3 features
*
* @author Adrian Cole, Jeremy Whitlock
* @deprecated please use
* {@code org.jclouds.ContextBuilder#buildApi(AWSS3Client.class)}
* as {@link AWSS3AsyncClient} interface will be removed in jclouds 1.7.
*/
@RequestFilters(RequestAuthorizeSignature.class)
@BlobScope(CONTAINER)

View File

@ -28,7 +28,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.azureblob.blobstore.config.AzureBlobStoreContextModule;
import org.jclouds.azureblob.config.AzureBlobRestClientModule;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -42,7 +41,12 @@ import com.google.inject.Module;
*/
public class AzureBlobApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<AzureBlobClient, AzureBlobAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<AzureBlobClient, AzureBlobAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(AzureBlobClient.class)} as
* {@link AzureBlobAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<AzureBlobClient, AzureBlobAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<AzureBlobClient, AzureBlobAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -70,6 +74,7 @@ public class AzureBlobApiMetadata extends BaseRestApiMetadata {
}
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder(){
super(AzureBlobClient.class, AzureBlobAsyncClient.class);
id("azureblob")

View File

@ -84,7 +84,10 @@ import com.google.inject.Provides;
* @see <a href="http://msdn.microsoft.com/en-us/library/dd135733.aspx" />
* @see AzureBlobClient
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(AzureBlobClient.class)} as
* {@link AzureBlobAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(SharedKeyLiteAuthentication.class)
@Headers(keys = AzureStorageHeaders.VERSION, values = "2009-09-19")
@SkipEncoding({ '/', '$' })

View File

@ -24,11 +24,9 @@ import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.dynect.v3.config.DynECTParserModule;
import org.jclouds.dynect.v3.config.DynECTRestClientModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
import com.google.inject.Module;
/**
@ -40,10 +38,6 @@ public class DynECTApiMetadata extends BaseRestApiMetadata {
public static final String ANONYMOUS_IDENTITY = "ANONYMOUS";
public static final TypeToken<RestContext<DynECTApi, DynECTAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<DynECTApi, DynECTAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@Override
public Builder toBuilder() {
return new Builder().fromApiMetadata(this);

View File

@ -49,7 +49,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* @see DynECTApi
* @see <a href="https://manage.dynect.net/help/docs/api2/rest/" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(DynECTApi.class)} as
* {@link DynECTAsyncApi} interface will be removed in jclouds 1.7.
*/
public interface DynECTAsyncApi extends Closeable {
/**
* @see DynECTApi#getJob

View File

@ -27,7 +27,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.glesys.compute.config.GleSYSComputeServiceContextModule;
import org.jclouds.glesys.config.GleSYSRestClientModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -41,7 +40,12 @@ import com.google.inject.Module;
*/
public class GleSYSApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<GleSYSApi, GleSYSAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<GleSYSApi, GleSYSAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(GleSYSApi.class)} as
* {@link GleSYSAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<GleSYSApi, GleSYSAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<GleSYSApi, GleSYSAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -67,6 +71,7 @@ public class GleSYSApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(GleSYSApi.class, GleSYSAsyncApi.class);
id("glesys")

View File

@ -34,7 +34,10 @@ import org.jclouds.rest.annotations.Delegate;
* @see GleSYSApi
* @see <a href="https://customer.glesys.com/api.php" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(GleSYSApi.class)} as
* {@link GleSYSAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface GleSYSAsyncApi extends Closeable {
/**

View File

@ -49,7 +49,7 @@ public class ArchiveApiLiveTest extends BaseGleSYSApiLiveTest {
archiveUser = identity.toLowerCase() + "_test9";
archiveCounter = retry(new Predicate<Integer>() {
public boolean apply(Integer value) {
return archiveApi.list().size() == value;
return archiveApi.list().size() == value.intValue();
}
}, 30, 1, SECONDS);
}

View File

@ -53,12 +53,12 @@ public class DomainApiLiveTest extends BaseGleSYSApiLiveTest {
domainApi = api.getDomainApi();
domainCounter = retry(new Predicate<Integer>() {
public boolean apply(Integer value) {
return domainApi.list().size() == value;
return domainApi.list().size() == value.intValue();
}
}, 30, 1, SECONDS);
recordCounter = retry(new Predicate<Integer>() {
public boolean apply(Integer value) {
return domainApi.listRecords(testDomain).size() == value;
return domainApi.listRecords(testDomain).size() == value.intValue();
}
}, 30, 1, SECONDS);

View File

@ -63,7 +63,7 @@ public class EmailAccountApiLiveTest extends BaseGleSYSApiLiveTest {
emailAccountCounter = retry(new Predicate<Integer>() {
public boolean apply(Integer value) {
return emailAccountApi.listDomain(testDomain).size() == value;
return emailAccountApi.listDomain(testDomain).size() == value.intValue();
}
}, 180, 5, SECONDS);

View File

@ -43,13 +43,13 @@ public class BaseGleSYSApiLiveTest extends BaseApiLiveTest<GleSYSApi> {
}
protected void createDomain(String domain) {
final DomainApi api = this.api.getDomainApi();
int before = api.list().size();
api.create(domain);
final DomainApi domainApi = api.getDomainApi();
int before = domainApi.list().size();
domainApi.create(domain);
Predicate<Integer> result = retry(new Predicate<Integer>() {
public boolean apply(Integer value) {
return api.list().size() == value;
return domainApi.list().size() == value.intValue();
}
}, 30, 1, SECONDS);

View File

@ -74,21 +74,21 @@ public class BaseGleSYSApiWithAServerLiveTest extends BaseGleSYSApiLiveTest {
}
protected void createDomain(String domain) {
final DomainApi api = this.api.getDomainApi();
int before = api.list().size();
api.create(domain);
final DomainApi domainApi = api.getDomainApi();
int before = domainApi.list().size();
domainApi.create(domain);
Predicate<Integer> result = retry(new Predicate<Integer>() {
public boolean apply(Integer value) {
return api.list().size() == value;
return domainApi.list().size() == value.intValue();
}
}, 30, 1, SECONDS);
assertTrue(result.apply(before + 1));
}
protected Predicate<State> createServer(String hostName) {
final ServerApi api = this.api.getServerApi();
final ServerApi serverApi = api.getServerApi();
ServerDetails testServer = api.createWithHostnameAndRootPassword(
ServerDetails testServer = serverApi.createWithHostnameAndRootPassword(
ServerSpec.builder().datacenter("Falkenberg").platform("OpenVZ").templateName("Ubuntu 10.04 LTS 32-bit")
.diskSizeGB(5).memorySizeMB(512).cpuCores(1).transferGB(50).build(), hostName, UUID.randomUUID()
.toString().replace("-",""));
@ -97,7 +97,7 @@ public class BaseGleSYSApiWithAServerLiveTest extends BaseGleSYSApiLiveTest {
assertEquals(testServer.getHostname(), hostName);
assertFalse(testServer.getIps().isEmpty());
Predicate<State> statusChecker = statusChecker(api, testServer.getId());
Predicate<State> statusChecker = statusChecker(serverApi, testServer.getId());
assertTrue(statusChecker.apply(Server.State.RUNNING));
serverId = testServer.getId();
return statusChecker;

View File

@ -27,7 +27,6 @@ import org.jclouds.apis.ApiMetadata;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.gogrid.compute.config.GoGridComputeServiceContextModule;
import org.jclouds.gogrid.config.GoGridRestClientModule;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import com.google.common.collect.ImmutableSet;
@ -41,7 +40,12 @@ import com.google.inject.Module;
*/
public class GoGridApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<GoGridClient, GoGridAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<GoGridClient, GoGridAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(GoGridClient.class)} as
* {@link GoGridAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<GoGridClient, GoGridAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<GoGridClient, GoGridAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -67,6 +71,7 @@ public class GoGridApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(GoGridClient.class, GoGridAsyncClient.class);
id("gogrid")
@ -74,7 +79,7 @@ public class GoGridApiMetadata extends BaseRestApiMetadata {
.identityName("API Key")
.credentialName("Shared Secret")
.documentation(URI.create("https://wiki.gogrid.com/wiki/index.php/API"))
.version(GoGridAsyncClient.VERSION)
.version("1.5")
.defaultEndpoint("https://api.gogrid.com/api")
.defaultProperties(GoGridApiMetadata.defaultProperties())
.view(typeToken(ComputeServiceContext.class))

View File

@ -29,9 +29,11 @@ import org.jclouds.rest.annotations.Delegate;
/**
* @author Oleksiy Yarmula
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(GoGridClient.class)} as
* {@link GoGridAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface GoGridAsyncClient extends Closeable {
public static final String VERSION = "1.5";
/**
* @see GoGridClient#getServerServices()

View File

@ -18,7 +18,6 @@
*/
package org.jclouds.gogrid;
import static org.jclouds.Constants.PROPERTY_API_VERSION;
import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE;
import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_ZONE;
@ -59,7 +58,6 @@ public class GoGridProviderMetadata extends BaseProviderMetadata {
properties.setProperty(PROPERTY_ZONE + ".1." + ISO3166_CODES, "US-CA");
properties.setProperty(PROPERTY_ZONE + ".2." + ISO3166_CODES, "US-VA");
properties.setProperty(PROPERTY_ZONE + ".3." + ISO3166_CODES, "NL-NH");
properties.setProperty(PROPERTY_API_VERSION, GoGridAsyncClient.VERSION);
properties.setProperty(TEMPLATE, "osFamily=UBUNTU,osVersionMatches=1[012].[01][04],imageNameMatches=.*w/ None.*,locationId=1");
return properties;
}

View File

@ -33,7 +33,6 @@ import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;
import org.jclouds.Fallbacks.NullOnNotFoundOr404;
import org.jclouds.gogrid.GoGridAsyncClient;
import org.jclouds.gogrid.binders.BindIdsToQueryParams;
import org.jclouds.gogrid.binders.BindNamesToQueryParams;
import org.jclouds.gogrid.domain.Option;
@ -56,7 +55,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* @author Oleksiy Yarmula
*/
@RequestFilters(SharedKeyLiteAuthentication.class)
@QueryParams(keys = VERSION, values = GoGridAsyncClient.VERSION)
@QueryParams(keys = VERSION, values = "{jclouds.api-version}")
public interface GridImageAsyncClient {
/**

View File

@ -28,7 +28,6 @@ import java.util.Set;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import org.jclouds.gogrid.GoGridAsyncClient;
import org.jclouds.gogrid.domain.Ip;
import org.jclouds.gogrid.domain.Option;
import org.jclouds.gogrid.filters.SharedKeyLiteAuthentication;
@ -47,7 +46,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* @author Oleksiy Yarmula
*/
@RequestFilters(SharedKeyLiteAuthentication.class)
@QueryParams(keys = VERSION, values = GoGridAsyncClient.VERSION)
@QueryParams(keys = VERSION, values = "{jclouds.api-version}")
public interface GridIpAsyncClient {
/**

View File

@ -25,7 +25,6 @@ import java.util.Set;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import org.jclouds.gogrid.GoGridAsyncClient;
import org.jclouds.gogrid.binders.BindIdsToQueryParams;
import org.jclouds.gogrid.binders.BindObjectNameToGetJobsRequestQueryParams;
import org.jclouds.gogrid.domain.Job;
@ -43,7 +42,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* @author Oleksiy Yarmula
*/
@RequestFilters(SharedKeyLiteAuthentication.class)
@QueryParams(keys = VERSION, values = GoGridAsyncClient.VERSION)
@QueryParams(keys = VERSION, values = "{jclouds.api-version}")
public interface GridJobAsyncClient {
/**

View File

@ -30,7 +30,6 @@ import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;
import org.jclouds.gogrid.GoGridAsyncClient;
import org.jclouds.gogrid.binders.BindIdsToQueryParams;
import org.jclouds.gogrid.binders.BindNamesToQueryParams;
import org.jclouds.gogrid.binders.BindRealIpPortPairsToQueryParams;
@ -54,7 +53,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* @author Oleksiy Yarmula
*/
@RequestFilters(SharedKeyLiteAuthentication.class)
@QueryParams(keys = VERSION, values = GoGridAsyncClient.VERSION)
@QueryParams(keys = VERSION, values = "{jclouds.api-version}")
public interface GridLoadBalancerAsyncClient {
/**

View File

@ -33,7 +33,6 @@ import org.jclouds.openstack.swift.blobstore.config.TemporaryUrlExtensionModule;
import org.jclouds.openstack.swift.config.SwiftRestClientModule.KeystoneStorageEndpointModule;
import org.jclouds.openstack.swift.extensions.KeystoneTemporaryUrlKeyAsyncApi;
import org.jclouds.openstack.swift.extensions.TemporaryUrlKeyApi;
import org.jclouds.rest.RestContext;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
@ -45,7 +44,12 @@ import com.google.inject.Module;
*/
public class HPCloudObjectStorageApiMetadata extends SwiftKeystoneApiMetadata {
public static final TypeToken<RestContext<HPCloudObjectStorageApi, HPCloudObjectStorageAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<HPCloudObjectStorageApi, HPCloudObjectStorageAsyncApi>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(HPCloudObjectStorageApi.class)} as
* {@link HPCloudObjectStorageAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<HPCloudObjectStorageApi, HPCloudObjectStorageAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<HPCloudObjectStorageApi, HPCloudObjectStorageAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@ -68,6 +72,7 @@ public class HPCloudObjectStorageApiMetadata extends SwiftKeystoneApiMetadata {
}
public static class Builder extends SwiftKeystoneApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder(){
super(HPCloudObjectStorageApi.class, HPCloudObjectStorageAsyncApi.class);
id("hpcloud-objectstorage")

View File

@ -60,7 +60,10 @@ import com.google.inject.Provides;
* href="https://api-docs.hpcloud.com/hpcloud-object-storage/1.0/content/ch_object-storage-dev-overview.html">HP
* Cloud Object Storage API</a>
* @author Jeremy Daggett
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(HPCloudObjectStorageApi.class)} as
* {@link HPCloudObjectStorageAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(AuthenticateRequest.class)
@Endpoint(Storage.class)
public interface HPCloudObjectStorageAsyncApi extends CommonSwiftAsyncClient {

View File

@ -25,7 +25,6 @@ import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import org.jclouds.softlayer.compute.config.SoftLayerComputeServiceContextModule;
import org.jclouds.softlayer.config.SoftLayerRestClientModule;
@ -41,7 +40,12 @@ import com.google.inject.Module;
*/
public class SoftLayerApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<SoftLayerClient, SoftLayerAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<SoftLayerClient, SoftLayerAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SoftLayerClient.class)} as
* {@link SoftLayerAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<SoftLayerClient, SoftLayerAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<SoftLayerClient, SoftLayerAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -67,6 +71,7 @@ public class SoftLayerApiMetadata extends BaseRestApiMetadata {
public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(SoftLayerClient.class, SoftLayerAsyncClient.class);
id("softlayer")

View File

@ -33,7 +33,10 @@ import org.jclouds.softlayer.features.VirtualGuestAsyncClient;
* @see SoftLayerClient
* @see <a href="http://sldn.softlayer.com/article/REST" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(SoftLayerClient.class)} as
* {@link SoftLayerAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public interface SoftLayerAsyncClient extends Closeable {
/**

View File

@ -7,7 +7,6 @@ import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.rest.RestContext;
import org.jclouds.trmk.ecloud.compute.config.TerremarkECloudComputeServiceContextModule;
import org.jclouds.trmk.ecloud.config.TerremarkECloudRestClientModule;
import org.jclouds.trmk.vcloud_0_8.internal.TerremarkVCloudApiMetadata;
@ -23,7 +22,12 @@ import com.google.inject.Module;
*/
public class TerremarkECloudApiMetadata extends TerremarkVCloudApiMetadata {
public static final TypeToken<RestContext<TerremarkECloudClient, TerremarkECloudAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<TerremarkECloudClient, TerremarkECloudAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(TerremarkECloudClient.class)} as
* {@link TerremarkECloudAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<TerremarkECloudClient, TerremarkECloudAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<TerremarkECloudClient, TerremarkECloudAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -49,6 +53,7 @@ public class TerremarkECloudApiMetadata extends TerremarkVCloudApiMetadata {
public static class Builder extends TerremarkVCloudApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(TerremarkECloudClient.class, TerremarkECloudAsyncClient.class);
id("trmk-ecloud")

View File

@ -91,7 +91,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* "http://support.theenterprisecloud.com/kb/default.asp?id=645&Lang=1&SID="
* />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(TerremarkECloudClient.class)} as
* {@link TerremarkECloudAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(SetVCloudTokenCookie.class)
public interface TerremarkECloudAsyncClient extends TerremarkVCloudAsyncClient {
/**

View File

@ -25,7 +25,6 @@ import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.rest.RestContext;
import org.jclouds.trmk.vcloud_0_8.internal.TerremarkVCloudApiMetadata;
import org.jclouds.trmk.vcloudexpress.compute.TerremarkVCloudExpressComputeServiceContextModule;
import org.jclouds.trmk.vcloudexpress.config.TerremarkVCloudExpressRestClientModule;
@ -41,7 +40,12 @@ import com.google.inject.Module;
*/
public class TerremarkVCloudExpressApiMetadata extends TerremarkVCloudApiMetadata {
public static final TypeToken<RestContext<TerremarkVCloudExpressClient, TerremarkVCloudExpressAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<TerremarkVCloudExpressClient, TerremarkVCloudExpressAsyncClient>>() {
/**
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(TerremarkVCloudExpressClient.class)} as
* {@link TerremarkVCloudExpressAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
public static final TypeToken<org.jclouds.rest.RestContext<TerremarkVCloudExpressClient, TerremarkVCloudExpressAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<TerremarkVCloudExpressClient, TerremarkVCloudExpressAsyncClient>>() {
private static final long serialVersionUID = 1L;
};
@ -67,6 +71,7 @@ public class TerremarkVCloudExpressApiMetadata extends TerremarkVCloudApiMetadat
public static class Builder extends TerremarkVCloudApiMetadata.Builder<Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
super(TerremarkVCloudExpressClient.class, TerremarkVCloudExpressAsyncClient.class);
id("trmk-vcloudexpress")

View File

@ -63,7 +63,10 @@ import com.google.common.util.concurrent.ListenableFuture;
*
* @see <a href="https://community.vcloudexpress.terremark.com/en-us/discussion_forums/f/60.aspx" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(TerremarkVCloudExpressClient.class)} as
* {@link TerremarkVCloudExpressAsyncClient} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(SetVCloudTokenCookie.class)
public interface TerremarkVCloudExpressAsyncClient extends TerremarkVCloudAsyncClient {
/**

View File

@ -22,12 +22,9 @@ import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.rest.RestContext;
import org.jclouds.rest.internal.BaseRestApiMetadata;
import org.jclouds.ultradns.ws.config.UltraDNSWSRestClientModule;
import com.google.common.reflect.TypeToken;
/**
* Implementation of {@link ApiMetadata} for Neustar's UltraDNSWS api.
*
@ -35,10 +32,6 @@ import com.google.common.reflect.TypeToken;
*/
public class UltraDNSWSApiMetadata extends BaseRestApiMetadata {
public static final TypeToken<RestContext<UltraDNSWSApi, UltraDNSWSAsyncApi>> CONTEXT_TOKEN = new TypeToken<RestContext<UltraDNSWSApi, UltraDNSWSAsyncApi>>() {
private static final long serialVersionUID = 1L;
};
@Override
public Builder toBuilder() {
return new Builder(getApi(), getAsyncApi()).fromApiMetadata(this);

View File

@ -47,7 +47,10 @@ import com.google.common.util.concurrent.ListenableFuture;
* @see <a href="https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01?wsdl" />
* @see <a href="https://www.ultradns.net/api/NUS_API_XML_SOAP.pdf" />
* @author Adrian Cole
* @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(UltraDNSWSApi.class)} as
* {@link UltraDNSWSAsyncApi} interface will be removed in jclouds 1.7.
*/
@Deprecated
@RequestFilters(SOAPWrapWithPasswordAuth.class)
@VirtualHost
public interface UltraDNSWSAsyncApi extends Closeable {