org.jclouds.http
Class TransformingHttpCommandExecutorServiceImpl
java.lang.Object
  
org.jclouds.http.TransformingHttpCommandExecutorServiceImpl
- All Implemented Interfaces: 
 - TransformingHttpCommandExecutorService
 
public class TransformingHttpCommandExecutorServiceImpl
- extends Object
- implements TransformingHttpCommandExecutorService
  
Executor which will invoke and transform the response of an EndpointCommand into generic
 type . TODO
- Author:
 
  - Adrian Cole
 
 
| 
Method Summary | 
<T,R extends HttpRequest> 
 
com.google.common.util.concurrent.ListenableFuture<T> | 
 
 
 | 
submit(HttpCommand command,
       com.google.common.base.Function<HttpResponse,T> responseTransformer)
 
          Submits the command and transforms the result before requested via Future.get(). | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
TransformingHttpCommandExecutorServiceImpl
@Inject
public TransformingHttpCommandExecutorServiceImpl(HttpCommandExecutorService client,
                                                         @Named(value="jclouds.user-threads")
                                                         ExecutorService userThreads)
submit
public <T,R extends HttpRequest> com.google.common.util.concurrent.ListenableFuture<T> submit(HttpCommand command,
                                                                                              com.google.common.base.Function<HttpResponse,T> responseTransformer)
- Submits the command and transforms the result before requested via 
Future.get().
- Specified by:
 submit in interface TransformingHttpCommandExecutorService
 
- Type Parameters:
 T - type that is required from the value.- Parameters:
 command - holds the state of the request, including metadata such as redirect countsresponseTransformer - how to transform the response from the above command
- Returns:
 - value of the intended response.
 
 
 
Copyright © 2009-2012 jclouds. All Rights Reserved.