| 1 |
/* |
| 2 |
* Copyright 2015-2020 the original author or authors |
| 3 |
* |
| 4 |
* This software is licensed under the Apache License, Version 2.0, |
| 5 |
* the GNU Lesser General Public License version 2 or later ("LGPL") |
| 6 |
* and the WTFPL. |
| 7 |
* You may choose either license to govern your use of this software only |
| 8 |
* upon the condition that you accept all of the terms of either |
| 9 |
* the Apache License 2.0, the LGPL 2.1+ or the WTFPL. |
| 10 |
*/ |
| 11 |
package org.minidns.util; |
| 12 |
|
| 13 |
/** |
| 14 |
* A recipient of success and exception callbacks. |
| 15 |
* |
| 16 |
* @param <V> the type of the success value. |
| 17 |
* @param <E> the type of the exception. |
| 18 |
*/ |
| 19 |
public interface CallbackRecipient<V, E> { |
| 20 |
|
| 21 |
CallbackRecipient<V, E> onSuccess(SuccessCallback<V> successCallback); |
| 22 |
|
| 23 |
CallbackRecipient<V, E> onError(ExceptionCallback<E> exceptionCallback); |
| 24 |
|
| 25 |
} |