01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15:
16: package org.griphyn.cPlanner.poolinfo;
17:
18: import org.griphyn.common.util.FactoryException;
19:
20: /**
21: * Class to notify of failures while instantiating Site Catalog
22: * implementations.
23: *
24: * @author Karan Vahi
25: * @version $Revision: 50 $
26: */
27:
28: public class SiteFactoryException extends FactoryException {
29:
30: /**
31: * The default classname that is associated with the exception.
32: */
33: public static final String DEFAULT_NAME = "Site Catalog";
34:
35: /**
36: * Constructs a <code>SiteFactoryException</code> with no detail
37: * message. The associated classname is set to value specified by
38: * <code>DEFAULT_NAME</code>.
39: *
40: * @param msg the detailed message.
41: *
42: * @see #DEFAULT_NAME
43: */
44: public SiteFactoryException(String msg) {
45: super (msg);
46: mClassname = this .DEFAULT_NAME;
47: }
48:
49: /**
50: * Constructs a <code>SiteFactoryException</code> with the specified detailed
51: * message.
52: *
53: * @param msg is the detailed message.
54: * @param classname the name of class that was trying to be instantiated or
55: * some other signifier like module name.
56: */
57: public SiteFactoryException(String msg, String classname) {
58: super (msg, classname);
59: }
60:
61: /**
62: * Constructs a <code>SiteFactoryException</code> with the
63: * specified detailed message and a cause. The associated classname is set
64: * to value specified by <code>DEFAULT_NAME</code>.
65: *
66: * @param msg is the detailed message that is to be logged.
67: * @param cause is the cause (which is saved for later retrieval by the
68: * {@link java.lang.Throwable#getCause()} method). A <code>null</code>
69: * value is permitted, and indicates that the cause is nonexistent or
70: * unknown.
71: *
72: * @see #DEFAULT_NAME
73: */
74: public SiteFactoryException(String msg, Throwable cause) {
75: super (msg, cause);
76: mClassname = this .DEFAULT_NAME;
77: }
78:
79: /**
80: * Constructs a <code>SiteFactoryException</code> with the
81: * specified detailed message and a cause.
82: *
83: * @param msg is the detailed message that is to be logged.
84: * @param classname the name of class that was trying to be instantiated.
85: * @param cause is the cause (which is saved for later retrieval by the
86: * {@link java.lang.Throwable#getCause()} method). A <code>null</code>
87: * value is permitted, and indicates that the cause is nonexistent or
88: * unknown.
89: */
90: public SiteFactoryException(String msg, String classname,
91: Throwable cause) {
92:
93: super(msg, cause);
94: mClassname = classname;
95: }
96:
97: }
|