package com.framsticks.util.dispatching; import com.framsticks.util.ExceptionHandler; import com.framsticks.util.FramsticksException; public abstract class Future extends FutureHandler { protected final ExceptionHandler handler; public Future(ExceptionHandler handler) { assert handler != null; this.handler = handler; } @Override public final void handle(FramsticksException exception) { handler.handle(exception); } public static Future doNothing(Class type, ExceptionHandler handler) { return doNothing(handler); } public static Future doNothing(ExceptionHandler handler) { return new Future(handler) { @Override protected void result(T result) { } }; } }