// Path: library/src/main/java/org/mariotaku/restfu/callback/Callback.java
// public interface Callback<T, E extends Exception> {
//     void result(@NotNull T result) throws E, IOException;
// 
//     void error(@NotNull E exception);
// }


import org.jetbrains.annotations.NotNull;
import org.mariotaku.restfu.callback.Callback;
import java.io.IOException;
package org.mariotaku.restfu;



/**
 * Created by mariotaku on 16/6/6.
 */
public interface ResultDispatcher<E extends Exception> {
    <T> void dispatchResult(@NotNull Callback<T, E> callback, @NotNull T obj) throws IOException, E;

    <T> void dispatchException(@NotNull Callback<T, E> callback, @NotNull E ex);

    final class Default<E extends Exception> implements ResultDispatcher<E> {

        @Override
        public <T> void dispatchResult(@NotNull Callback<T, E> callback, @NotNull T result) throws IOException, E {
            callback.result(result);
        }

        @Override
// Path: library/src/main/java/org/mariotaku/restfu/callback/Callback.java
// public interface Callback<T, E extends Exception> {
//     void result(@NotNull T result) throws E, IOException;
// 
//     void error(@NotNull E exception);
// }


// Path: library/src/main/java/org/mariotaku/restfu/ResultDispatcher.java
import org.jetbrains.annotations.NotNull;
import org.mariotaku.restfu.callback.Callback;
import java.io.IOException;

package org.mariotaku.restfu;



/**
 * Created by mariotaku on 16/6/6.
 */
public interface ResultDispatcher<E extends Exception> {
    <T> void dispatchResult(@NotNull Callback<T, E> callback, @NotNull T obj) throws IOException, E;

    <T> void dispatchException(@NotNull Callback<T, E> callback, @NotNull E ex);

    final class Default<E extends Exception> implements ResultDispatcher<E> {

        @Override
        public <T> void dispatchResult(@NotNull Callback<T, E> callback, @NotNull T result) throws IOException, E {
            callback.result(result);
        }

        @Override
        public <T> void dispatchException(@NotNull Callback<T, E> callback, @NotNull E exception) {