public DefaultExecution( ExecControllerInternal controller, @Nullable ExecutionRef parent, EventLoop eventLoop, Action<? super RegistrySpec> registryInit, Action<? super Execution> action, Action<? super Throwable> onError, Action<? super Execution> onStart, Action<? super Execution> onComplete ) throws Exception { this.ref = new Ref(this, parent); this.controller = controller; this.eventLoop = eventLoop; this.onError = onError; this.onComplete = onComplete; registryInit.execute(registry); onStart.execute(this); this.execStream = new InitialExecStream(() -> action.execute(this)); this.interceptors = Iterables.concat( controller.getInterceptors(), ImmutableList.copyOf(registry.getAll(ExecInterceptor.class)) ); for (ExecInitializer initializer : controller.getInitializers()) { initializer.init(this); } for (ExecInitializer initializer : registry.getAll(ExecInitializer.class)) { initializer.init(this); } }