01: //
02: // This file is part of the prose package.
03: //
04: // The contents of this file are subject to the Mozilla Public License
05: // Version 1.1 (the "License"); you may not use this file except in
06: // compliance with the License. You may obtain a copy of the License at
07: // http://www.mozilla.org/MPL/
08: //
09: // Software distributed under the License is distributed on an "AS IS" basis,
10: // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11: // for the specific language governing rights and limitations under the
12: // License.
13: //
14: // The Original Code is prose.
15: //
16: // The Initial Developer of the Original Code is Andrei Popovici. Portions
17: // created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
18: // All Rights Reserved.
19: //
20: // Contributor(s):
21: // $Id: Insertable.java,v 1.1.1.1 2003/07/02 15:30:50 apopovic Exp $
22: // =====================================================================
23: //
24: // (history at end)
25: //
26:
27: package ch.ethz.prose;
28:
29: /**
30: * Interface Insertable should be implemented by all
31: * elements that get inserted into PROSE and need
32: * to be notified. Examples are extensions or crosscuts.
33: *
34: * @version $Revision: 1.1.1.1 $
35: * @author Andrei Popovici
36: */
37: public interface Insertable {
38:
39: /** Action executed by the extension before/after the
40: * insertion of an element. This method should be used to perform
41: * specific setup actions for the crosscuts of an
42: * extensions (if the insertable is an extension), e.g.,
43: * the extension was inserted in order to configure
44: * its crosscut. If the insertable is a crosscut, it may
45: * be told in which VM is running.
46: *
47: * @param beforeInsertion if <code>true</code>, the action
48: * is performed before insertion, otherwise it is
49: * performed after the insertion.
50: */
51: public void insertionAction(boolean beforeInsertion)
52: throws AspectInsertionException;
53:
54: /** Action executed by the extension before/after its
55: * withdrawal.
56: *
57: * @param beforeWithdrawal if <code>true</code>, the action
58: * is performed before withdrawal, otherwise it is
59: * performed after the withdrawal.
60: */
61: public void withdrawalAction(boolean beforeWithdrawal);
62:
63: /** Return the priority of this insertable object.
64: */
65: public int getPriority();
66: }
67:
68: //======================================================================
69: //
70: // $Log: Insertable.java,v $
71: // Revision 1.1.1.1 2003/07/02 15:30:50 apopovic
72: // Imported from ETH Zurich
73: //
74: // Revision 1.1 2003/05/05 13:58:29 popovici
75: // renaming from runes to prose
76: //
77: // Revision 1.4 2003/04/29 12:41:04 popovici
78: // Feature added:
79: // - the 'setPriority' in class insertable allows now Aspects and Crosscuts to have a priority.
80: // Notitification is done from low int priorities to high int priorities.
81: // - the 'setAspectID' introduced to replace constuctor; used to be cumberstone for subclasses
82: //
83: // Revision 1.3 2003/04/17 15:15:06 popovici
84: // Extension->Aspect renaming
85: //
86: // Revision 1.2 2002/03/28 13:48:36 popovici
87: // Mozilla-ified
88: //
89: // Revision 1.1 2002/02/21 12:36:48 popovici
90: // Interface 'Insertable' added. Extensions and crosscuts
91: // are now insertable objects.
92: //
|