package de.neitzel.fxdesigner.preview; import java.util.concurrent.*; /** * Owned example state. Return ViewDependencies on FX runtimes with the DI adapter API. * An ApplicationContext is supported on runtimes that provide the legacy loaders. */ public interface PreviewSession extends AutoCloseable { M model(); C context(); /** * Called after View loading/CSS/layout, on FX. Never block FX; complete asynchronously if needed. */ default CompletionStage ready() { return CompletableFuture.completedFuture(null); } /** * Release owned services/timers/listeners. Called once on FX, including load/readiness failure. */ @Override void close() throws Exception; }