Renaming 'ServiceClient's AuthenticationClients to save confusion with user-accessible ServiceClient in keystone 2.0

This commit is contained in:
Adam Lowe 2012-04-30 10:46:50 +01:00
parent a5b3da047e
commit 71ad3abf2a
8 changed files with 24 additions and 24 deletions

View File

@ -35,17 +35,17 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides asynchronous access to Service via their REST API.
* <p/>
*
* @see ServiceClient
* @see AuthenticationClient
* @see <a href=
* "http://docs.openstack.org/api/openstack-identity-service/2.0/content/Service_API_Client_Operations.html"
* />
* @author Adrian Cole
*/
@Path("/v1.1")
public interface ServiceAsyncClient {
public interface AuthenticationAsyncClient {
/**
* @see ServiceClient#authenticate
* @see AuthenticationClient#authenticate
*/
@POST
@SelectJson("auth")

View File

@ -27,13 +27,13 @@ import org.jclouds.openstack.keystone.v1_1.domain.Auth;
* Provides synchronous access to the KeyStone Service API.
* <p/>
*
* @see ServiceAsyncClient
* @see AuthenticationAsyncClient
* @see <a href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/Service_API_Client_Operations.html"
* />
* @author Adrian Cole
*/
@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS)
public interface ServiceClient {
public interface AuthenticationClient {
/**
* Authenticate to generate a token.

View File

@ -35,8 +35,8 @@ import org.jclouds.http.annotation.ClientError;
import org.jclouds.location.Provider;
import org.jclouds.location.suppliers.RegionIdToURISupplier;
import org.jclouds.openstack.Authentication;
import org.jclouds.openstack.keystone.v1_1.ServiceAsyncClient;
import org.jclouds.openstack.keystone.v1_1.ServiceClient;
import org.jclouds.openstack.keystone.v1_1.AuthenticationAsyncClient;
import org.jclouds.openstack.keystone.v1_1.AuthenticationClient;
import org.jclouds.openstack.keystone.v1_1.domain.Auth;
import org.jclouds.openstack.keystone.v1_1.handlers.RetryOnRenew;
import org.jclouds.openstack.keystone.v1_1.suppliers.RegionIdToURIFromAuthForServiceSupplier;
@ -63,7 +63,7 @@ public class AuthenticationServiceModule extends AbstractModule {
}).to(GetAuth.class);
// ServiceClient is used directly for filters and retry handlers, so let's bind it
// explicitly
bindClientAndAsyncClient(binder(), ServiceClient.class, ServiceAsyncClient.class);
bindClientAndAsyncClient(binder(), AuthenticationClient.class, AuthenticationAsyncClient.class);
install(new FactoryModuleBuilder().implement(RegionIdToURISupplier.class,
RegionIdToURIFromAuthForServiceSupplier.class).build(RegionIdToURISupplier.Factory.class));
bind(HttpRetryHandler.class).annotatedWith(ClientError.class).to(RetryOnRenew.class);
@ -88,7 +88,7 @@ public class AuthenticationServiceModule extends AbstractModule {
public static class GetAuth extends RetryOnTimeOutExceptionFunction<Credentials, Auth> {
@Inject
public GetAuth(final ServiceClient client) {
public GetAuth(final AuthenticationClient client) {
super(new Function<Credentials, Auth>() {
@Override

View File

@ -37,16 +37,16 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides asynchronous access to Service via their REST API.
* <p/>
*
* @see ServiceClient
* @see AuthenticationClient
* @see <a href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/Service_API_Client_Operations.html"
* />
* @author Adrian Cole
*/
@Path("/v2.0")
public interface ServiceAsyncClient {
public interface AuthenticationAsyncClient {
/**
* @see ServiceClient#authenticateTenantWithCredentials(String,PasswordCredentials)
* @see AuthenticationClient#authenticateTenantWithCredentials(String,PasswordCredentials)
*/
@POST
@SelectJson("access")
@ -57,7 +57,7 @@ public interface ServiceAsyncClient {
PasswordCredentials passwordCredentials);
/**
* @see ServiceClient#authenticateTenantWithCredentials(String,ApiAccessKeyCredentials)
* @see AuthenticationClient#authenticateTenantWithCredentials(String,ApiAccessKeyCredentials)
*/
@POST
@SelectJson("access")

View File

@ -29,13 +29,13 @@ import org.jclouds.openstack.keystone.v2_0.domain.PasswordCredentials;
* Provides synchronous access to the KeyStone Service API.
* <p/>
*
* @see ServiceAsyncClient
* @see AuthenticationAsyncClient
* @see <a href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/Service_API_Client_Operations.html"
* />
* @author Adrian Cole
*/
@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS)
public interface ServiceClient {
public interface AuthenticationClient {
/**
* Authenticate to generate a token.

View File

@ -40,8 +40,8 @@ import org.jclouds.location.suppliers.ZoneIdsSupplier;
import org.jclouds.location.suppliers.derived.RegionIdsFromRegionIdToURIKeySet;
import org.jclouds.location.suppliers.derived.ZoneIdsFromZoneIdToURIKeySet;
import org.jclouds.openstack.Authentication;
import org.jclouds.openstack.keystone.v2_0.ServiceAsyncClient;
import org.jclouds.openstack.keystone.v2_0.ServiceClient;
import org.jclouds.openstack.keystone.v2_0.AuthenticationAsyncClient;
import org.jclouds.openstack.keystone.v2_0.AuthenticationClient;
import org.jclouds.openstack.keystone.v2_0.domain.Access;
import org.jclouds.openstack.keystone.v2_0.functions.AuthenticateApiAccessKeyCredentials;
import org.jclouds.openstack.keystone.v2_0.functions.AuthenticatePasswordCredentials;
@ -146,7 +146,7 @@ public class KeystoneAuthenticationModule extends AbstractModule {
bind(CredentialType.class).toProvider(CredentialTypeFromPropertyOrDefault.class);
// ServiceClient is used directly for filters and retry handlers, so let's bind it
// explicitly
bindClientAndAsyncClient(binder(), ServiceClient.class, ServiceAsyncClient.class);
bindClientAndAsyncClient(binder(), AuthenticationClient.class, AuthenticationAsyncClient.class);
install(locationModule);
}

View File

@ -22,7 +22,7 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import org.jclouds.domain.Credentials;
import org.jclouds.openstack.keystone.v2_0.ServiceClient;
import org.jclouds.openstack.keystone.v2_0.AuthenticationClient;
import org.jclouds.openstack.keystone.v2_0.domain.Access;
import org.jclouds.openstack.keystone.v2_0.domain.ApiAccessKeyCredentials;
import org.jclouds.rest.AuthorizationException;
@ -31,10 +31,10 @@ import com.google.common.base.Function;
@Singleton
public class AuthenticateApiAccessKeyCredentials implements Function<Credentials, Access> {
private final ServiceClient client;
private final AuthenticationClient client;
@Inject
public AuthenticateApiAccessKeyCredentials(ServiceClient client) {
public AuthenticateApiAccessKeyCredentials(AuthenticationClient client) {
this.client = client;
}

View File

@ -20,7 +20,7 @@ package org.jclouds.openstack.keystone.v2_0.functions;
import javax.inject.Inject;
import org.jclouds.domain.Credentials;
import org.jclouds.openstack.keystone.v2_0.ServiceClient;
import org.jclouds.openstack.keystone.v2_0.AuthenticationClient;
import org.jclouds.openstack.keystone.v2_0.domain.Access;
import org.jclouds.openstack.keystone.v2_0.domain.PasswordCredentials;
import org.jclouds.rest.AuthorizationException;
@ -28,10 +28,10 @@ import org.jclouds.rest.AuthorizationException;
import com.google.common.base.Function;
public class AuthenticatePasswordCredentials implements Function<Credentials, Access> {
private final ServiceClient client;
private final AuthenticationClient client;
@Inject
public AuthenticatePasswordCredentials(ServiceClient client) {
public AuthenticatePasswordCredentials(AuthenticationClient client) {
this.client = client;
}