All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nohope.app.App Maven / Gradle / Ivy

The newest version!
package org.nohope.app;

/**
 * @author ketoth xupack
 * @since 7/15/12 3:13 PM
 */
public abstract class App {
    protected abstract void onStart() throws Exception;

    protected void onVMShutdown() {
    }

    public void start() throws Exception {
        Runtime.getRuntime().addShutdownHook(new Thread(this::onVMShutdownWrapper));
        onStart();
    }

    void onVMShutdownWrapper() {
        onVMShutdown();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy