001 /**
002 * Copyright (C) 2011-2012 Barchart, Inc. <http://www.barchart.com/>
003 *
004 * All rights reserved. Licensed under the OSI BSD License.
005 *
006 * http://www.opensource.org/licenses/bsd-license.php
007 */
008 package com.barchart.util.concurrent;
009
010 import java.util.concurrent.Future;
011
012 /**
013 * <p>
014 * Defines an interface for {@link FutureCallbackTask} callback listeners.
015 *
016 * @author jeremy
017 * @see FutureCallbackTask
018 * @param <E>
019 * The type of object that the callback returns
020 */
021 public interface FutureListener<E> {
022
023 /**
024 * Called when the deferred task completes successfully.
025 *
026 * @param value
027 * The return value from the deferred task
028 */
029 public void resultAvailable(Future<E> result) throws Exception;
030
031 }