01: /*
02: * <copyright>
03: *
04: * Copyright 2002-2004 BBNT Solutions, LLC
05: * under sponsorship of the Defense Advanced Research Projects
06: * Agency (DARPA).
07: *
08: * You can redistribute this software and/or modify it under the
09: * terms of the Cougaar Open Source License as published on the
10: * Cougaar Open Source Website (www.cougaar.org).
11: *
12: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23: *
24: * </copyright>
25: */
26: package org.cougaar.core.examples.mobility.ldm;
27:
28: import java.io.Serializable;
29: import org.cougaar.core.mobility.Ticket;
30: import org.cougaar.core.mts.MessageAddress;
31: import org.cougaar.core.util.UID;
32: import org.cougaar.core.util.UniqueObject;
33:
34: /**
35: * A Script is an immutable list of mobility steps and
36: * control loops.
37: * <p>
38: * See ScriptParser for parsing details.
39: * <p>
40: * A Proc is a runtime (mutable) instance of a
41: * Script. The Script itself is immutable, like code.
42: * <p>
43: * This will very likely be enhanced with more complex
44: * control logic. For now there's just:<ul>
45: * <li>Step options, to create a single step</li>
46: * <li>Goto entries, to create loops</li>
47: * </ul>
48: * Any step failure will halt a script.
49: */
50: public interface Script extends UniqueObject {
51:
52: /**
53: * UID support from unique-object.
54: */
55: UID getUID();
56:
57: /**
58: * Get the number of entries.
59: */
60: int getSize();
61:
62: /**
63: * Get the script entry at the specified index.
64: */
65: Entry getEntry(int idx);
66:
67: // marker for entries
68: interface Entry {
69: }
70:
71: }
|