diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2AsyncClient.java b/aws/core/src/main/java/org/jclouds/aws/ec2/EC2AsyncClient.java index 106abede9b..f87a7e8c32 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/EC2AsyncClient.java +++ b/aws/core/src/main/java/org/jclouds/aws/ec2/EC2AsyncClient.java @@ -23,273 +23,45 @@ */ package org.jclouds.aws.ec2; -import static org.jclouds.aws.ec2.reference.EC2Parameters.ACTION; -import static org.jclouds.aws.ec2.reference.EC2Parameters.VERSION; +import org.jclouds.aws.ec2.internal.EC2AsyncClientImpl; +import org.jclouds.aws.ec2.services.AMIAsyncClient; +import org.jclouds.aws.ec2.services.ElasticIPAddressAsyncClient; +import org.jclouds.aws.ec2.services.InstanceAsyncClient; +import org.jclouds.aws.ec2.services.KeyPairAsyncClient; +import org.jclouds.aws.ec2.services.SecurityGroupAsyncClient; -import java.net.InetAddress; -import java.util.SortedSet; -import java.util.concurrent.Future; - -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; - -import org.jclouds.aws.ec2.binders.BindGroupNameToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindInetAddressesToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindInstanceIdsToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindKeyNameToIndexedFormParams; -import org.jclouds.aws.ec2.binders.BindUserIdGroupPairToSourceSecurityGroupFormParams; -import org.jclouds.aws.ec2.domain.Image; -import org.jclouds.aws.ec2.domain.ImageAttribute; -import org.jclouds.aws.ec2.domain.IpProtocol; -import org.jclouds.aws.ec2.domain.KeyPair; -import org.jclouds.aws.ec2.domain.PublicIpInstanceIdPair; -import org.jclouds.aws.ec2.domain.Reservation; -import org.jclouds.aws.ec2.domain.SecurityGroup; -import org.jclouds.aws.ec2.domain.TerminatedInstance; -import org.jclouds.aws.ec2.domain.UserIdGroupPair; -import org.jclouds.aws.ec2.filters.FormSigner; -import org.jclouds.aws.ec2.functions.ReturnVoidOnGroupNotFound; -import org.jclouds.aws.ec2.options.DescribeImagesOptions; -import org.jclouds.aws.ec2.options.RunInstancesOptions; -import org.jclouds.aws.ec2.xml.AllocateAddressResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeAddressesResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeImagesResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeInstancesResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeKeyPairsResponseHandler; -import org.jclouds.aws.ec2.xml.DescribeSecurityGroupsResponseHandler; -import org.jclouds.aws.ec2.xml.KeyPairResponseHandler; -import org.jclouds.aws.ec2.xml.RunInstancesResponseHandler; -import org.jclouds.aws.ec2.xml.TerminateInstancesResponseHandler; -import org.jclouds.rest.annotations.BinderParam; -import org.jclouds.rest.annotations.Endpoint; -import org.jclouds.rest.annotations.ExceptionParser; -import org.jclouds.rest.annotations.FormParams; -import org.jclouds.rest.annotations.ParamParser; -import org.jclouds.rest.annotations.RequestFilters; -import org.jclouds.rest.annotations.VirtualHost; -import org.jclouds.rest.annotations.XMLResponseParser; -import org.jclouds.rest.functions.InetAddressToHostAddress; +import com.google.inject.ImplementedBy; /** - * Provides access to EC2 via their REST API. - *
+ * Provides asynchronous access to EC2 services. * * @author Adrian Cole */ -@Endpoint(EC2.class) -@RequestFilters(FormSigner.class) -@FormParams(keys = VERSION, values = "2009-08-15") -@VirtualHost +@ImplementedBy(EC2AsyncClientImpl.class) public interface EC2AsyncClient { + /** + * Provides asynchronous access to AMI services. + */ + AMIAsyncClient getAMIServices(); /** - * @see EC2Client#describeImages + * Provides asynchronous access to Elastic IP Address services. */ - @POST - @Path("/") - @FormParams(keys = ACTION, values = "DescribeImages") - @XMLResponseParser(DescribeImagesResponseHandler.class) - Future extends SortedSet