public class ListenableFutureIterableResultAdapter extends AbstractIterableResultAdapter<org.springframework.util.concurrent.ListenableFuture>
This class will adapt results from an iterable object to a listenable future. The future task returned will have already executed with the results available.
It will accept adaptations wherein the original value is some sort of iterable and the required return type
is an instance of ListenableFuture. Remember that it does not check for individual object type
compatibility.
This adapter will execute at priority -50.
| Constructor and Description |
|---|
ListenableFutureIterableResultAdapter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Invocation invocation,
Object originalValue)
Called to determine whether or not this adapter can adapt the original value passed down from a data
store operation to the type required by the repository method being invoked
|
protected org.springframework.util.concurrent.ListenableFuture |
doAdapt(Invocation invocation,
Iterable iterable)
This is called when we want to adapt an iterable object to another type.
|
adaptcompareTo, getPrioritypublic ListenableFutureIterableResultAdapter()
protected org.springframework.util.concurrent.ListenableFuture doAdapt(Invocation invocation, Iterable iterable)
AbstractIterableResultAdapterdoAdapt in class AbstractIterableResultAdapter<org.springframework.util.concurrent.ListenableFuture>invocation - the invocation which called for this adaptationiterable - the iterable to be adapted to the appropriate result typepublic boolean accepts(Invocation invocation, Object originalValue)
ResultAdapterinvocation - the invocationoriginalValue - the original valueCopyright © 2014–2016. All rights reserved.