001/*
002 * Copyright 2019-2021 M. Sean Gilligan.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package app.supernaut;
017
018/**
019 *  An abstraction of a User Interface application that is separated
020 *  into a foreground app and a background app. Currently, it is <b>unused for JavaFX</b>.
021 */
022public interface ForegroundApp {
023    /**
024     * Initialize the application
025     *
026     * @throws Exception an exception occurred
027     */
028    void init() throws Exception;
029
030    /**
031     * Start the application
032     *
033     * @throws Exception an exception occurred
034     */
035    default void start() throws Exception {}
036    
037    /**
038     * Stop the application
039     *
040     * @throws Exception an exception occurred
041     */
042    void stop() throws Exception;
043}