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: package org.griphyn.vdl.router;
16:
17: import java.util.*;
18: import org.griphyn.vdl.classes.Definition;
19: import org.griphyn.vdl.classes.Derivation;
20:
21: /**
22: * This interface defines an arbitration. If multiple derivations
23: * produce the same output file, one derivation must be chosen over
24: * all others. There is not yet any mean to declare that none will
25: * do.
26: *
27: * @author Jens-S. Vöckler
28: * @author Yong Zhao
29: * @version $Revision $
30: */
31: public interface Arbiter {
32: /**
33: * The lone method of the arbitrarion receives some environmental
34: * information about the position in the call stack. Currently,
35: * this information is of limited nature. Furthermore, it receives
36: * the list of candidates. From this list, one candidate must be
37: * chosen, and returned to as the chosen one.<p>
38: *
39: * The environmental description currently contains the following entries:
40: * <table border="0">
41: * <tr><th>key</th><th>type</th><th>meaning</th></tr>
42: * <tr><td>lfn</td><td>String</td><td>Output filename produced by all.</td></tr>
43: * <tr><td>cwns</td><td>String</td><td>Current working namespace,
44: * may be null.</td></tr>
45: * <tr><td>level</td><td>Integer</td><td>Current recursion depth.</td></tr>
46: * </table>
47: *
48: * @param dvlist is a set of candidates
49: * @param environment is a map describing the environment.
50: * @return the chosen candidate from the input set
51: */
52: public Derivation arbit(java.util.Collection dvlist,
53: java.util.Map environment);
54: }
|