mirror of https://github.com/apache/jclouds.git
added generic bindings
This commit is contained in:
parent
18f2ca3225
commit
05d4b19fdd
|
@ -72,7 +72,9 @@ import org.jclouds.gogrid.predicates.ServerLatestJobCompleted;
|
|||
import org.jclouds.gogrid.util.GoGridUtils;
|
||||
import org.jclouds.logging.Logger;
|
||||
import org.jclouds.predicates.RetryablePredicate;
|
||||
import org.jclouds.rest.RestContext;
|
||||
import org.jclouds.rest.annotations.Provider;
|
||||
import org.jclouds.rest.internal.RestContextImpl;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicate;
|
||||
|
@ -100,6 +102,9 @@ public class GoGridComputeServiceContextModule extends AbstractModule {
|
|||
bind(new TypeLiteral<ComputeServiceContext>() {
|
||||
}).to(new TypeLiteral<ComputeServiceContextImpl<GoGridClient, GoGridAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(new TypeLiteral<RestContext<GoGridClient, GoGridAsyncClient>>() {
|
||||
}).to(new TypeLiteral<RestContextImpl<GoGridClient, GoGridAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(AddNodeWithTagStrategy.class).to(GoGridAddNodeWithTagStrategy.class);
|
||||
bind(ListNodesStrategy.class).to(GoGridListNodesStrategy.class);
|
||||
bind(GetNodeMetadataStrategy.class).to(GoGridGetNodeMetadataStrategy.class);
|
||||
|
|
|
@ -68,6 +68,8 @@ import org.jclouds.ibmdev.compute.functions.InstanceToNodeMetadata;
|
|||
import org.jclouds.ibmdev.domain.Instance;
|
||||
import org.jclouds.ibmdev.reference.IBMDeveloperCloudConstants;
|
||||
import org.jclouds.logging.Logger;
|
||||
import org.jclouds.rest.RestContext;
|
||||
import org.jclouds.rest.internal.RestContextImpl;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicate;
|
||||
|
@ -97,6 +99,11 @@ public class IBMDeveloperCloudComputeServiceContextModule extends AbstractModule
|
|||
.to(
|
||||
new TypeLiteral<ComputeServiceContextImpl<IBMDeveloperCloudClient, IBMDeveloperCloudAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(new TypeLiteral<RestContext<IBMDeveloperCloudClient, IBMDeveloperCloudAsyncClient>>() {
|
||||
})
|
||||
.to(
|
||||
new TypeLiteral<RestContextImpl<IBMDeveloperCloudClient, IBMDeveloperCloudAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(AddNodeWithTagStrategy.class).to(IBMDeveloperCloudAddNodeWithTagStrategy.class);
|
||||
bind(ListNodesStrategy.class).to(IBMDeveloperCloudListNodesStrategy.class);
|
||||
bind(GetNodeMetadataStrategy.class).to(IBMDeveloperCloudGetNodeMetadataStrategy.class);
|
||||
|
|
|
@ -74,6 +74,8 @@ import org.jclouds.rackspace.cloudservers.domain.Server;
|
|||
import org.jclouds.rackspace.cloudservers.domain.ServerStatus;
|
||||
import org.jclouds.rackspace.cloudservers.options.ListOptions;
|
||||
import org.jclouds.rackspace.config.RackspaceLocationsModule;
|
||||
import org.jclouds.rest.RestContext;
|
||||
import org.jclouds.rest.internal.RestContextImpl;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicate;
|
||||
|
@ -106,6 +108,9 @@ public class CloudServersComputeServiceContextModule extends AbstractModule {
|
|||
.to(
|
||||
new TypeLiteral<ComputeServiceContextImpl<CloudServersClient, CloudServersAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(new TypeLiteral<RestContext<CloudServersClient, CloudServersAsyncClient>>() {
|
||||
}).to(new TypeLiteral<RestContextImpl<CloudServersClient, CloudServersAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(AddNodeWithTagStrategy.class).to(CloudServersAddNodeWithTagStrategy.class);
|
||||
bind(ListNodesStrategy.class).to(CloudServersListNodesStrategy.class);
|
||||
bind(GetNodeMetadataStrategy.class).to(CloudServersGetNodeMetadataStrategy.class);
|
||||
|
|
|
@ -66,7 +66,9 @@ import org.jclouds.domain.Location;
|
|||
import org.jclouds.domain.LocationScope;
|
||||
import org.jclouds.domain.internal.LocationImpl;
|
||||
import org.jclouds.logging.Logger;
|
||||
import org.jclouds.rest.RestContext;
|
||||
import org.jclouds.rest.annotations.Provider;
|
||||
import org.jclouds.rest.internal.RestContextImpl;
|
||||
import org.jclouds.rimuhosting.miro.RimuHostingAsyncClient;
|
||||
import org.jclouds.rimuhosting.miro.RimuHostingClient;
|
||||
import org.jclouds.rimuhosting.miro.domain.NewServerResponse;
|
||||
|
@ -106,6 +108,9 @@ public class RimuHostingComputeServiceContextModule extends AbstractModule {
|
|||
.to(
|
||||
new TypeLiteral<ComputeServiceContextImpl<RimuHostingClient, RimuHostingAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(new TypeLiteral<RestContext<RimuHostingClient, RimuHostingAsyncClient>>() {
|
||||
}).to(new TypeLiteral<RestContextImpl<RimuHostingClient, RimuHostingAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(new TypeLiteral<Function<Server, Iterable<String>>>() {
|
||||
}).to(ServerToPublicAddresses.class);
|
||||
bind(AddNodeWithTagStrategy.class).to(RimuHostingAddNodeWithTagStrategy.class);
|
||||
|
|
|
@ -42,6 +42,8 @@ import org.jclouds.compute.strategy.ListNodesStrategy;
|
|||
import org.jclouds.compute.strategy.RebootNodeStrategy;
|
||||
import org.jclouds.compute.strategy.RunNodesAndAddToSetStrategy;
|
||||
import org.jclouds.domain.Location;
|
||||
import org.jclouds.rest.RestContext;
|
||||
import org.jclouds.rest.internal.RestContextImpl;
|
||||
import org.jclouds.vcloud.VCloudAsyncClient;
|
||||
import org.jclouds.vcloud.VCloudClient;
|
||||
import org.jclouds.vcloud.compute.BaseVCloudComputeClient;
|
||||
|
@ -96,6 +98,9 @@ public class VCloudComputeServiceContextModule extends AbstractModule {
|
|||
bind(new TypeLiteral<ComputeServiceContext>() {
|
||||
}).to(new TypeLiteral<ComputeServiceContextImpl<VCloudClient, VCloudAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(new TypeLiteral<RestContext<VCloudClient, VCloudAsyncClient>>() {
|
||||
}).to(new TypeLiteral<RestContextImpl<VCloudClient, VCloudAsyncClient>>() {
|
||||
}).in(Scopes.SINGLETON);
|
||||
bind(RunNodesAndAddToSetStrategy.class).to(
|
||||
EncodeTemplateIdIntoNameRunNodesAndAddToSetStrategy.class);
|
||||
bind(ListNodesStrategy.class).to(VCloudListNodesStrategy.class);
|
||||
|
|
Loading…
Reference in New Issue