001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016
017package org.opends.guitools.controlpanel.browser;
018
019
020/**
021 * Error record.
022 * We group all the error variables in one class to decrease the number of
023 * variables in BasicNode.
024 */
025public class BasicNodeError {
026  private NodeRefresher.State state;
027  private Exception exception;
028  private Object arg;
029
030  /**
031   * The constructor of the BasicNodeError.
032   * @param state the state of the refresher when the exception occurred.
033   * @param x the exception.
034   * @param arg the argument of the exception.
035   */
036  public BasicNodeError(NodeRefresher.State state, Exception x, Object arg) {
037    this.state = state;
038    exception = x;
039    this.arg = arg;
040  }
041
042  /**
043   * Returns the state of the refresher when the exception occurred.
044   * @return the state of the refresher when the exception occurred.
045   */
046  public NodeRefresher.State getState() {
047    return state;
048  }
049
050  /**
051   * Returns the exception.
052   * @return the exception.
053   */
054  public Exception getException() {
055    return exception;
056  }
057
058  /**
059   * Returns the argument of the exception.
060   * @return the argument of the exception.
061   */
062  public Object getArg() {
063    return arg;
064  }
065}