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

com.fasterxml.storemate.shared.StartAndStoppable Maven / Gradle / Ivy

There is a newer version: 1.1.4
Show newest version
package com.fasterxml.storemate.shared;

/**
 * Simple add-on interface, to denote things are to be managed according
 * to life-cycle of container. This is typically implemented by service
 * components, but may also be used by client-side components when there
 * is costly state to initialize and maintain.
 */
public interface StartAndStoppable
{
    /**
     * Method called when the component should start its operation.
     * This occurs after initialization (if any; and out of scope for
     * this interface)
     */
    public void start() throws java.lang.Exception;

    /**
     * Method called before {@link #stop}, and is meant to start graceful
     * shutdown.
     */
    public void prepareForStop() throws Exception;

    /**
     * Method called when the component is to shut down; follows call to
     * {@link #prepareForStop()}, possibly with some delay.
     */
    public void stop() throws java.lang.Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy