/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements. See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache license, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the license for the specific language governing permissions and
 * limitations under the license.
 */

package org.apache.logging.log4j.core;

/**
 *
 */
public interface LifeCycle {
    
    /**
     * Status of a life cycle like a {@link LoggerContext}..
     */
    public enum State {
        /** Initialized but not yet started. */
        INITIALIZED,
        /** In the process of starting. */
        STARTING,
        /** Has started. */
        STARTED,
        /** Stopping is in progress. */
        STOPPING,
        /** Has stopped. */
        STOPPED
    }
    
    void start();

    void stop();

    boolean isStarted();

    boolean isStopped();
}

@@ -841,16 +841,828 @@
 %0A%0A/**%0A *
+ All proper Java frameworks implement some sort of object life cycle. In Log4j, the main interface for handling%0A * the life cycle context of an object is this one. An object first starts in the %7B@link State#INITIALIZED%7D state%0A * by default to indicate the class has been loaded. From here, calling the %7B@link #start()%7D method will change this%0A * state to %7B@link State#STARTING%7D. After successfully being started, this state is changed to %7B@link State#STARTED%7D.%0A * When the %7B@link #stop()%7D is called, this goes into the %7B@link State#STOPPING%7D state. After successfully being%0A * stopped, this goes into the %7B@link State#STOPPED%7D state. In most circumstances, implementation classes should%0A * store their %7B@link State%7D in a %7B@code volatile%7D field or inside an%0A * %7B@link java.util.concurrent.atomic.AtomicReference%7D.
 %0A */%0Apub

Add javadoc intro.