org.springframework.util.concurrent.ListenableFutureAdapter Java Examples
The following examples show how to use
org.springframework.util.concurrent.ListenableFutureAdapter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AsyncRestTemplate.java From spring-analysis-note with MIT License | 5 votes |
private static ListenableFuture<URI> adaptToLocationHeader(ListenableFuture<HttpHeaders> future) { return new ListenableFutureAdapter<URI, HttpHeaders>(future) { @Override @Nullable protected URI adapt(HttpHeaders headers) throws ExecutionException { return headers.getLocation(); } }; }
Example #2
Source File: AsyncRestTemplate.java From spring-analysis-note with MIT License | 5 votes |
private static ListenableFuture<Set<HttpMethod>> adaptToAllowHeader(ListenableFuture<HttpHeaders> future) { return new ListenableFutureAdapter<Set<HttpMethod>, HttpHeaders>(future) { @Override protected Set<HttpMethod> adapt(HttpHeaders headers) throws ExecutionException { return headers.getAllow(); } }; }
Example #3
Source File: AsyncRestTemplate.java From java-technology-stack with MIT License | 5 votes |
private static ListenableFuture<URI> adaptToLocationHeader(ListenableFuture<HttpHeaders> future) { return new ListenableFutureAdapter<URI, HttpHeaders>(future) { @Override @Nullable protected URI adapt(HttpHeaders headers) throws ExecutionException { return headers.getLocation(); } }; }
Example #4
Source File: AsyncRestTemplate.java From java-technology-stack with MIT License | 5 votes |
private static ListenableFuture<Set<HttpMethod>> adaptToAllowHeader(ListenableFuture<HttpHeaders> future) { return new ListenableFutureAdapter<Set<HttpMethod>, HttpHeaders>(future) { @Override protected Set<HttpMethod> adapt(HttpHeaders headers) throws ExecutionException { return headers.getAllow(); } }; }
Example #5
Source File: AsyncRestTemplate.java From lams with GNU General Public License v2.0 | 5 votes |
private static ListenableFuture<URI> adaptToLocationHeader(ListenableFuture<HttpHeaders> future) { return new ListenableFutureAdapter<URI, HttpHeaders>(future) { @Override protected URI adapt(HttpHeaders headers) throws ExecutionException { return headers.getLocation(); } }; }
Example #6
Source File: AsyncRestTemplate.java From lams with GNU General Public License v2.0 | 5 votes |
private static ListenableFuture<Set<HttpMethod>> adaptToAllowHeader(ListenableFuture<HttpHeaders> future) { return new ListenableFutureAdapter<Set<HttpMethod>, HttpHeaders>(future) { @Override protected Set<HttpMethod> adapt(HttpHeaders headers) throws ExecutionException { return headers.getAllow(); } }; }