Package org.springframework.util.concurrent

# Class ListenableFutureCallbackRegistry<T>

java.lang.Object
org.springframework.util.concurrent.ListenableFutureCallbackRegistry<T>

Type Parameters:
  `T` - the callback result type

@Deprecated(since="6.0", forRemoval=true) public class ListenableFutureCallbackRegistry<T> extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
as of 6.0, with no concrete replacement
Helper class for `ListenableFuture` implementations that maintains a queue of success and failure callbacks and helps to notify them.

Inspired by `com.google.common.util.concurrent.ExecutionList`.

Since:
  4.0
Author:
  Arjen Poutsma, Sebastien Deleuze, Rossen Stoyanchev

## Constructor Summary

Constructors
Constructor
Description
`ListenableFutureCallbackRegistry()`
Deprecated, for removal: This API element is subject to removal in a future version.

## Method Summary

Modifier and Type
Method
Description
`void`
`addCallback(ListenableFutureCallback<? super T> callback)`
Deprecated, for removal: This API element is subject to removal in a future version.
Add the given callback to this registry.
`void`
`addFailureCallback(FailureCallback callback)`
Deprecated, for removal: This API element is subject to removal in a future version.
Add the given failure callback to this registry.
`void`
`addSuccessCallback(SuccessCallback<? super T> callback)`
Deprecated, for removal: This API element is subject to removal in a future version.
Add the given success callback to this registry.
`void`
`failure(Throwable ex)`
Deprecated, for removal: This API element is subject to removal in a future version.
Trigger a `FailureCallback.onFailure(Throwable)` call on all added callbacks with the given `Throwable`.
`void`
`success(T result)`
Deprecated, for removal: This API element is subject to removal in a future version.
Trigger a `SuccessCallback.onSuccess(Object)` call on all added callbacks with the given result.

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

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

## Constructor Details

### ListenableFutureCallbackRegistry

public ListenableFutureCallbackRegistry()
Deprecated, for removal: This API element is subject to removal in a future version.

## Method Details

### addCallback

public void addCallback(ListenableFutureCallback<? super T> callback)
Deprecated, for removal: This API element is subject to removal in a future version.
Add the given callback to this registry.

Parameters:
  `callback` - the callback to add

### addSuccessCallback

public void addSuccessCallback(SuccessCallback<? super T> callback)
Deprecated, for removal: This API element is subject to removal in a future version.
Add the given success callback to this registry.

Parameters:
  `callback` - the success callback to add
Since:
  4.1

### addFailureCallback

public void addFailureCallback(FailureCallback callback)
Deprecated, for removal: This API element is subject to removal in a future version.
Add the given failure callback to this registry.

Parameters:
  `callback` - the failure callback to add
Since:
  4.1

### success

public void success(@Nullable T result)
Deprecated, for removal: This API element is subject to removal in a future version.
Trigger a `SuccessCallback.onSuccess(Object)` call on all added callbacks with the given result.

Parameters:
  `result` - the result to trigger the callbacks with

### failure

public void failure(Throwable ex)
Deprecated, for removal: This API element is subject to removal in a future version.
Trigger a `FailureCallback.onFailure(Throwable)` call on all added callbacks with the given `Throwable`.

Parameters:
  `ex` - the exception to trigger the callbacks with