001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the License. 004 * 005 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 006 * specific language governing permission and limitations under the License. 007 * 008 * When distributing Covered Software, include this CDDL Header Notice in each file and include 009 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 010 * Header, with the fields enclosed by brackets [] replaced by your own identifying 011 * information: "Portions copyright [year] [name of copyright owner]". 012 * 013 * Copyright 2015 ForgeRock AS. 014 */ 015package org.forgerock.util.promise; 016 017/** 018 * A completion handler for consuming the results of asynchronous tasks. 019 * 020 * @param <V> 021 * The type of result consumed by the handler. 022 */ 023// @FunctionalInterface 024public interface ResultHandler<V> { 025 /** 026 * Invoked when the asynchronous task has completed successfully. 027 * 028 * @param result 029 * The result of the asynchronous task. 030 */ 031 void handleResult(V result); 032}