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

net.sf.eBusx.monitor.ActionLevel Maven / Gradle / Ivy

//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later
// version.
//
// This library is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the GNU Lesser General Public License for more
// details.
//
// You should have received a copy of the GNU Lesser General
// Public License along with this library; if not, write to the
//
// Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330,
// Boston, MA
// 02111-1307 USA
//
// The Initial Developer of the Original Code is Charles W. Rapp.
// Portions created by Charles W. Rapp are
// Copyright 2011, 2019. Charles W. Rapp
// All Rights Reserved.
//

package net.sf.eBusx.monitor;

/**
 * The unique action levels reported in the PersistentStatus and
 * TransientStatus notifications. The levels are arranged from
 * an information-only report ({@link #NO_ACTION}) to a problem
 * which precludes the application from operating
 * ({@link #FATAL_ERROR}).
 *
 * @author Charles Rapp
 */

public enum ActionLevel
{
    /**
     * Nominal operation. Reported for informational purposes
     * only.
     */
    NO_ACTION("No Action"),

    /**
     * A problem is occurring which may require
     * operator intervention since the application has the
     * ability to automatically recover from this problem.
     */
    POSSIBLE_ACTION("Possible Action"),

    /**
     * A problem is occurring which requires operator
     * intervention.
     */
    ACTION_REQUIRED("Action Required"),

    /**
     * A problem has caused unrecoverable failure and
     * system shutdown.
     */
    FATAL_ERROR("Fatal Error");

//---------------------------------------------------------------
// Member data.
//

    //-----------------------------------------------------------
    // Locals.
    //

    /**
     * The action level human-readable text.
     */
    private final String mText;

//---------------------------------------------------------------
// Member methods.
//

    //-----------------------------------------------------------
    // Constructors.
    //

    /**
     * Creates a new action level instance with the given
     * human-readable name.
     * @param text the human-readable name for this action level.
     */
    private ActionLevel(final String text)
    {
        mText =text;
    } // end of ActionLevel(String)

    //
    // end of Constructors.
    //-----------------------------------------------------------

    //-----------------------------------------------------------
    // Get methods.
    //

    /**
     * Returns the human-readable text.
     * @return the human-readable text.
     */
    public String text()
    {
        return (mText);
    } // end fo text()

    //
    // end of Get methods.
    //-----------------------------------------------------------

    /**
     * Returns the human-readable text.
     * @return the action level textual representation.
     */
    @Override
    public String toString()
    {
        return (mText);
    } // end of toString()
} // end of enum ActionLevel




© 2015 - 2024 Weber Informatics LLC | Privacy Policy