Example usage for org.springframework.util.concurrent ListenableFutureCallback onSuccess

List of usage examples for org.springframework.util.concurrent ListenableFutureCallback onSuccess

Introduction

In this page you can find the example usage for org.springframework.util.concurrent ListenableFutureCallback onSuccess.

Prototype

void onSuccess(@Nullable T result);

Source Link

Document

Called when the ListenableFuture completes with success.

Usage

From source file:org.trustedanalytics.metricsprovider.integrationtests.utils.TestListenableFuture.java

@Override
public void addCallback(ListenableFutureCallback<? super ResponseEntity<T>> listenableFutureCallback) {

    listenableFutureCallback.onSuccess(new ResponseEntity<>(objectToReturn, HttpStatus.OK));
}