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