Statistics
| Branch: | Revision:

root / extensions / httpnio / src / main / java / org / jclouds / http / httpnio / pool / NioTransformingHttpCommandExecutorService.java @ 35e7942d

History | View | Annotate | Download (1.9 kB)

1
/**
2
 *
3
 * Copyright (C) 2009 Cloud Conscious, LLC. <info@cloudconscious.com>
4
 *
5
 * ====================================================================
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 * http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 * ====================================================================
18
 */
19
package org.jclouds.http.httpnio.pool;
20

    
21
import java.util.concurrent.BlockingQueue;
22
import java.util.concurrent.ExecutorService;
23

    
24
import javax.inject.Inject;
25
import javax.inject.Named;
26
import javax.inject.Singleton;
27

    
28
import org.apache.http.nio.NHttpConnection;
29
import org.jclouds.Constants;
30
import org.jclouds.http.HttpCommandRendezvous;
31
import org.jclouds.http.pool.ConnectionPoolTransformingHttpCommandExecutorService;
32

    
33
/**
34
 * // TODO: Adrian: Document this!
35
 * 
36
 * @author Adrian Cole
37
 */
38
@Singleton
39
public class NioTransformingHttpCommandExecutorService extends
40
         ConnectionPoolTransformingHttpCommandExecutorService<NHttpConnection> {
41

    
42
   @Override
43
   public String toString() {
44
      return String.format("NioTransformingHttpCommandExecutorService [ hashCode=%d ]", hashCode());
45
   }
46

    
47
   @Inject
48
   public NioTransformingHttpCommandExecutorService(
49
            @Named(Constants.PROPERTY_USER_THREADS) ExecutorService executor,
50
            NioHttpCommandConnectionPool.Factory poolFactory,
51
            BlockingQueue<HttpCommandRendezvous<?>> commandQueue) {
52
      super(executor, poolFactory, commandQueue);
53
   }
54

    
55
}