001/*
002 * JPPF.
003 * Copyright (C) 2005-2018 JPPF Team.
004 * http://www.jppf.org
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.jppf.management;
020
021/**
022 * An enumeration of the possible pending actions for a node, set via one of the
023 * {@code shutdown(false)} or {@code restart(false)} methods of {@link JPPFNodeAdminMBean}. 
024 * @author Laurent Cohen
025 */
026public enum NodePendingAction {
027  /**
028   * There is no pending qction.
029   */
030  NONE("node.pending.none"),
031  /**
032   * A deferred shutdown was requested.
033   */
034  SHUTDOWN("node.pending.shutdown"),
035  /**
036   * A deferred restart was requested.
037   */
038  RESTART("node.pending.restart");
039
040  /**
041   * The name to display.
042   */
043  private final String displayName;
044
045  /**
046   * Initialize this enum element with the specified localized display name.
047   * @param msg the display name ot localize.
048   */
049  private NodePendingAction(final String msg) {
050    displayName = msg;
051  }
052
053  /**
054   * Get the localizable display name.
055   * @return the key of a message ot localize.
056   */
057  public String getDisplayName() {
058    return displayName;
059  }
060}