├── .classpath
├── .gitignore
├── .project
├── .settings
├── org.codehaus.groovy.eclipse.preferences.prefs
├── org.eclipse.jdt.core.prefs
└── org.eclipse.mylyn.tasks.ui.prefs
├── README
├── pom.xml
└── src
├── .gitignore
├── main
├── assembly
│ └── all.xml
├── java
│ └── groovyx
│ │ └── net
│ │ └── http
│ │ ├── AsyncHTTPBuilder.java
│ │ ├── AuthConfig.java
│ │ ├── ContentEncoding.java
│ │ ├── ContentEncodingRegistry.java
│ │ ├── ContentType.java
│ │ ├── DeflateEncoding.java
│ │ ├── EncoderRegistry.java
│ │ ├── GZIPEncoding.java
│ │ ├── HTTPBuilder.java
│ │ ├── HttpContextDecorator.java
│ │ ├── HttpResponseDecorator.java
│ │ ├── HttpResponseException.java
│ │ ├── HttpURLClient.java
│ │ ├── Method.java
│ │ ├── ParserRegistry.java
│ │ ├── RESTClient.java
│ │ ├── ResponseParseException.java
│ │ ├── Status.java
│ │ ├── StringHashMap.java
│ │ ├── URIBuilder.java
│ │ ├── package.html
│ │ └── thirdparty
│ │ ├── GAEClientConnection.java
│ │ └── GAEConnectionManager.java
├── resources
│ └── catalog
│ │ ├── HTMLlat1.ent
│ │ ├── HTMLspecial.ent
│ │ ├── HTMLsymbol.ent
│ │ ├── frameset.dtd
│ │ ├── html.xml
│ │ ├── loose.dtd
│ │ ├── strict.dtd
│ │ ├── xhtml-lat1.ent
│ │ ├── xhtml-special.ent
│ │ ├── xhtml-symbol.ent
│ │ ├── xhtml1-frameset.dtd
│ │ ├── xhtml1-strict.dtd
│ │ ├── xhtml1-transitional.dtd
│ │ ├── xhtml11-flat.dtd
│ │ └── xhtml11.dtd
└── script
│ ├── release_tweet.groovy
│ └── twitter_restbuilder.groovy
├── site
├── apt
│ ├── changes.apt
│ ├── contrib.apt
│ ├── doc
│ │ ├── async.apt
│ │ ├── auth.apt
│ │ ├── contentTypes.apt
│ │ ├── get.apt
│ │ ├── handlers.apt
│ │ ├── httpurlclient.apt
│ │ ├── index.apt
│ │ ├── json.apt
│ │ ├── post.apt
│ │ ├── rest.apt
│ │ ├── ssl.apt
│ │ ├── uribuilder.apt
│ │ └── xml.apt
│ ├── download.apt.vm
│ ├── home.apt
│ └── index.apt
├── examples.txt
├── resources
│ └── images
│ │ ├── logo.png
│ │ └── logo.svg
├── site.xml
└── xdoc
│ └── about.xml
└── test
├── groovy
└── groovyx
│ └── net
│ └── http
│ ├── AsyncHTTPBuilderTest.groovy
│ ├── HTTPBuilderTest.groovy
│ ├── HttpURLClientTest.groovy
│ ├── RESTClientTest.groovy
│ ├── RegistryTest.groovy
│ ├── SSLTest.groovy
│ ├── ServerTest.groovy
│ ├── URIBuilderTest.groovy
│ └── thirdparty
│ └── GAETest.groovy
└── resources
├── log4j.xml
├── rss-catalog.xml
├── rss_1_0_validator.xml
└── truststore.jks
/.classpath:
--------------------------------------------------------------------------------
1 |
2 | get
53 | * and post
) return a {@link Future} instance, whose
54 | * {@link Future#get() get} method will provide access to whatever value was
55 | * returned from the response handler closure.
56 | *
57 | * @author Tom Nichols
58 | */
59 | public class AsyncHTTPBuilder extends HTTPBuilder {
60 |
61 | /**
62 | * Default pool size is one is not supplied in the constructor.
63 | */
64 | public static final int DEFAULT_POOL_SIZE = 4;
65 |
66 | protected ExecutorService threadPool;
67 | // = (ThreadPoolExecutor)Executors.newCachedThreadPool();
68 |
69 | /**
70 | * Accepts the following named parameters:
71 | *
request
methods
122 | * (including get
and post
) may be used to
123 | * retrieve whatever value may be returned from the executed response
124 | * handler closure.
125 | */
126 | @Override
127 | protected Future> doRequest( final RequestConfigDelegate delegate ) {
128 | return threadPool.submit( new Callable