Package org.springframework.util.concurrent

# Class FutureAdapter<T,S>

java.lang.Object
org.springframework.util.concurrent.FutureAdapter<T,S>

Type Parameters:
  `T` - the type of this `Future`
  `S` - the type of the adaptee's `Future`

All Implemented Interfaces:
  `Future<T>`

Direct Known Subclasses:
  `ListenableFutureAdapter`

@Deprecated(since="6.0") public abstract class FutureAdapter<T,S> extends Object implements Future<T>
Deprecated.
as of 6.0, with no concrete replacement
Abstract class that adapts a `Future` parameterized over S into a `Future` parameterized over T. All methods are delegated to the adaptee, where `get()` and `get(long, TimeUnit)` call `adapt(Object)` on the adaptee's result.

Since:
  4.0
Author:
  Arjen Poutsma

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`FutureAdapter(Future<S> adaptee)`
Deprecated.
Constructs a new `FutureAdapter` with the given adaptee.

## Method Summary

Modifier and Type
Method
Description
`protected abstract T`
`adapt(S adapteeResult)`
Deprecated.
Adapts the given adaptee's result into T.
`boolean`
`cancel(boolean mayInterruptIfRunning)`
Deprecated.
`T`
`get()`
Deprecated.
`T`
`get(long timeout, TimeUnit unit)`
Deprecated.
`protected Future<S>`
`getAdaptee()`
Deprecated.
Returns the adaptee.
`boolean`
`isCancelled()`
Deprecated.
`boolean`
`isDone()`
Deprecated.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FutureAdapter

protected FutureAdapter(Future<S> adaptee)
Deprecated.
Constructs a new `FutureAdapter` with the given adaptee.

Parameters:
  `adaptee` - the future to delegate to

## Method Details

### getAdaptee

protected Future<S> getAdaptee()
Deprecated.
Returns the adaptee.

### cancel

public boolean cancel(boolean mayInterruptIfRunning)
Deprecated.

Specified by:
  `cancel` in interface `Future<T>`

### isCancelled

public boolean isCancelled()
Deprecated.

Specified by:
  `isCancelled` in interface `Future<T>`

### isDone

public boolean isDone()
Deprecated.

Specified by:
  `isDone` in interface `Future<T>`

### get

@Nullable public T get() throws InterruptedException, ExecutionException
Deprecated.

Specified by:
  `get` in interface `Future<T>`
Throws:
  `InterruptedException`
  `ExecutionException`

### get

@Nullable public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
Deprecated.

Specified by:
  `get` in interface `Future<T>`
Throws:
  `InterruptedException`
  `ExecutionException`
  `TimeoutException`

### adapt

@Nullable protected abstract T adapt(S adapteeResult) throws ExecutionException
Deprecated.
Adapts the given adaptee's result into T.

Returns:
  the adapted result
Throws:
  `ExecutionException`