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.common.catalog;
17:
18: import java.util.Properties;
19:
20: /**
21: * This interface create a common ancestor for all cataloging
22: * interfaces.
23: *
24: * @author Jens-S. Vöckler
25: * @author Yong Zhao
26: * @version $Revision: 83 $
27: */
28: public interface Catalog {
29:
30: /**
31: * The default DB Driver properties prefix.
32: */
33: public static final String DB_ALL_PREFIX = "pegasus.catalog.*.db";
34:
35: /**
36: * Establishes a link between the implementation and the thing the
37: * implementation is build upon. <p>
38: * FIXME: The cause for failure is lost without exceptions.
39: *
40: * @param props contains all necessary data to establish the link.
41: * @return true if connected now, or false to indicate a failure.
42: */
43: public boolean connect(Properties props);
44:
45: /**
46: * Explicitely free resources before the garbage collection hits.
47: */
48: public void close();
49:
50: /**
51: * Predicate to check, if the connection with the catalog's
52: * implementation is still active. This helps determining, if it makes
53: * sense to call <code>close()</code>.
54: *
55: * @return true, if the implementation is disassociated, false otherwise.
56: * @see #close()
57: */
58: public boolean isClosed();
59: }
|