provides an alternative to using a
asynchronous request processing. While a
is executed concurrently
on behalf of the application, with a
the application can
produce the result from a thread of its choice.
Subclasses can extend this class to easily associate additional data or behavior
DeferredResult. For example, one might want to associate the user
used to create the
DeferredResult by extending the class and adding an
additional property for the user. In this way, the user could easily be accessed
later without the need to use a data structure to do the mapping.
An example of associating additional behavior to this class might be realized
by extending the class to implement an additional interface. For example, one
might want to implement
Comparable so that when the
is added to a
PriorityQueue it is handled in the correct order.