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 */ 015 016package org.forgerock.util.promise; 017 018/** 019 * A completion handler for consuming runtime exceptions which occur during the 020 * execution of asynchronous tasks. 021 */ 022// @FunctionalInterface 023public interface RuntimeExceptionHandler { 024 /** 025 * Invoked when the asynchronous task has failed with a runtime exception. 026 * 027 * @param exception The runtime exception indicating why the asynchronous 028 * task has failed. 029 */ 030 void handleRuntimeException(RuntimeException exception); 031}