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: // $ITI: PointFilter.java,v 1.1 2000/10/16 11:53:23 popovici Exp $
22: // =====================================================================
23: //
24: // (history at end)
25: //
26:
27: package ch.ethz.prose.filter;
28:
29: import java.io.Serializable;
30:
31: import ch.ethz.jvmai.JoinPoint;
32: import ch.ethz.prose.engine.JoinPointRequest;
33:
34: /**
35: * Interface PointFilter is a strategy-object used by
36: * <code>AbstractCrosscut</code>. A <code>PointFilter</code>
37: * provides the functionality for filtering <code>JoinPointReqests</code>
38: * and the corresponding <code>JoinPointEvent</code>s in a consistent
39: * manner.
40: * <p>
41: * A <code>PointFilter</code> should document what types of events
42: * it considers as being <em>special</em>. The default is to reject events
43: * which this <code>PointFilter</code> cannot interpret.
44: * @version $ITIRevision: 1.1 $
45: * @author Andrei Popovici
46: */
47: public abstract class PointFilter implements Serializable {
48:
49: /**
50: * Return <code>true</code> if this crosscut specializer accepts
51: * the event <code>evRec</code>.
52: *
53: * @param evRec the request to be filtered
54: * @return <code>true</code> if the specified event is considered eligible (special)
55: * with respect to the strategy of this crosscut specializer
56: */
57: abstract public boolean isSpecialRequest(JoinPointRequest evRec);
58:
59: /**
60: * Filter <code>execEvent</code> according to the strategy of this object.
61: *
62: * @param execEvent the event to be filtered
63: * @return <code>true</code> if <code>execEvent</code> is
64: * considered <em>special</em>,
65: * that is, if it corresponds to the filtering criterion defined by this object.
66: */
67: abstract public boolean isSpecialEvent(JoinPoint execEvent);
68: }
69:
70: //======================================================================
71: //
72: // $ITIlog: PointFilter.java,v $
73: // Revision 1.1 2000/10/16 11:53:23 popovici
74: // Initial Revision
75: //
|