From f2e7e259d3fdc458723a0ba43e2f71735e54f4d7 Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Thu, 17 Dec 2009 17:02:51 +0000 Subject: [PATCH] removed unused base classes git-svn-id: http://jclouds.googlecode.com/svn/trunk@2456 3d8758e0-26b5-11de-8745-db77d3ebf521 --- .../ConfiguresResponseTransformer.java | 42 -------------- .../org/jclouds/command/EndpointCommand.java | 58 ------------------- .../EndpointCommandExecutorService.java | 49 ---------------- .../java/org/jclouds/command/Request.java | 33 ----------- .../java/org/jclouds/http/HttpCommand.java | 23 +++++++- .../http/HttpCommandExecutorService.java | 16 ++++- .../java/org/jclouds/http/HttpRequest.java | 4 +- .../main/java/org/jclouds/rest/MapBinder.java | 2 +- 8 files changed, 36 insertions(+), 191 deletions(-) delete mode 100644 core/src/main/java/org/jclouds/command/ConfiguresResponseTransformer.java delete mode 100644 core/src/main/java/org/jclouds/command/EndpointCommand.java delete mode 100644 core/src/main/java/org/jclouds/command/EndpointCommandExecutorService.java delete mode 100644 core/src/main/java/org/jclouds/command/Request.java diff --git a/core/src/main/java/org/jclouds/command/ConfiguresResponseTransformer.java b/core/src/main/java/org/jclouds/command/ConfiguresResponseTransformer.java deleted file mode 100644 index 6357f001a0..0000000000 --- a/core/src/main/java/org/jclouds/command/ConfiguresResponseTransformer.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * Copyright (C) 2009 Cloud Conscious, LLC. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - */ -package org.jclouds.command; - -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -/** - * designates the module configures a Client to a cloud. - * - * @author Adrian Cole - * - */ -@Retention(RUNTIME) -@Target(TYPE) -public @interface ConfiguresResponseTransformer { - -} diff --git a/core/src/main/java/org/jclouds/command/EndpointCommand.java b/core/src/main/java/org/jclouds/command/EndpointCommand.java deleted file mode 100644 index b94ac1f813..0000000000 --- a/core/src/main/java/org/jclouds/command/EndpointCommand.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * - * Copyright (C) 2009 Cloud Conscious, LLC. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - */ -package org.jclouds.command; - -/** - * - * {@code } type of endpoint that this client will interact with. {@code } type of request - * that this endpoint expects. {@code } type of response that this endpoint produces. - * - * @author Adrian Cole - */ -public interface EndpointCommand, R> { - - int incrementFailureCount(); - - int getFailureCount(); - - /** - * generates a request object used to invoke this command. - * - * @return - */ - Q getRequest(); - - /** - * - * Used to prevent a command from being re-executed. - * - * Any calls to {@link execute} following this will return the below exception. - * - * @param exception - */ - void setException(Exception exception); - - Exception getException(); - -} diff --git a/core/src/main/java/org/jclouds/command/EndpointCommandExecutorService.java b/core/src/main/java/org/jclouds/command/EndpointCommandExecutorService.java deleted file mode 100644 index fbdc0feacf..0000000000 --- a/core/src/main/java/org/jclouds/command/EndpointCommandExecutorService.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - * Copyright (C) 2009 Cloud Conscious, LLC. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - */ -package org.jclouds.command; - -import java.util.concurrent.Future; - -/** - * - * - * {@code } type of endpoint that this client will interact with. {@code } type of request - * that this endpoint expects. {@code } type of response that this endpoint produces. - * - * @author Adrian Cole - */ -public interface EndpointCommandExecutorService, R> { - - /** - * Asks the command to build a request relevant for an endpoint that produces responses of - * generic type {@code R}. and invokes it on the endpoint, returning a future - * - * @param - * type of result the command extracts from the return value - * @param command - * that generates requests - * @return {@link Future} containing the response from the {@code endpoint} - */ - Future submit(C command); -} diff --git a/core/src/main/java/org/jclouds/command/Request.java b/core/src/main/java/org/jclouds/command/Request.java deleted file mode 100644 index 461aa4f19d..0000000000 --- a/core/src/main/java/org/jclouds/command/Request.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - * Copyright (C) 2009 Cloud Conscious, LLC. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - */ -package org.jclouds.command; - -/** - * A service request must have an endPoint associated with it. - * - * @author Adrian Cole - */ -public interface Request { - E getEndpoint(); -} diff --git a/core/src/main/java/org/jclouds/http/HttpCommand.java b/core/src/main/java/org/jclouds/http/HttpCommand.java index e60194af5b..3091257642 100644 --- a/core/src/main/java/org/jclouds/http/HttpCommand.java +++ b/core/src/main/java/org/jclouds/http/HttpCommand.java @@ -23,16 +23,14 @@ */ package org.jclouds.http; -import java.net.URI; -import org.jclouds.command.EndpointCommand; /** * Command whose endpoint is an http service. * * @author Adrian Cole */ -public interface HttpCommand extends EndpointCommand { +public interface HttpCommand { int incrementRedirectCount(); @@ -54,4 +52,23 @@ public interface HttpCommand extends EndpointCommand { +public interface HttpCommandExecutorService { + + /** + * Asks the command to build a request relevant for an endpoint that produces responses of + * generic type {@code HttpResponse}. and invokes it on the endpoint, returning a future + * + * @param + * type of result the command extracts from the return value + * @param command + * that generates requests + * @return {@link Future} containing the response from the {@code endpoint} + */ + Future submit(HttpCommand command); } diff --git a/core/src/main/java/org/jclouds/http/HttpRequest.java b/core/src/main/java/org/jclouds/http/HttpRequest.java index 83c4dd4311..289e9f805a 100644 --- a/core/src/main/java/org/jclouds/http/HttpRequest.java +++ b/core/src/main/java/org/jclouds/http/HttpRequest.java @@ -33,8 +33,6 @@ import java.util.List; import javax.ws.rs.core.HttpHeaders; -import org.jclouds.command.Request; - import com.google.common.collect.Multimap; import com.google.inject.internal.Lists; import com.google.inject.internal.Nullable; @@ -44,7 +42,7 @@ import com.google.inject.internal.Nullable; * * @author Adrian Cole */ -public class HttpRequest extends HttpMessage implements Request { +public class HttpRequest extends HttpMessage { private List requestFilters = Lists.newArrayList(); diff --git a/core/src/main/java/org/jclouds/rest/MapBinder.java b/core/src/main/java/org/jclouds/rest/MapBinder.java index a7cd2dd033..412132b1f6 100644 --- a/core/src/main/java/org/jclouds/rest/MapBinder.java +++ b/core/src/main/java/org/jclouds/rest/MapBinder.java @@ -38,7 +38,7 @@ public interface MapBinder extends Binder { /** * creates and binds the POST payload to the request using parameters specified. * - * @see MapPayloadParam + * @see org.jclouds.rest.annotations.MapPayloadParam */ public void bindToRequest(HttpRequest request, Map postParams);