KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > impl > test > ProvidesImpl


1 /*
2  * Sun Public License Notice
3  *
4  * The contents of this file are subject to the Sun Public License
5  * Version 1.0 (the "License"). You may not use this file except in
6  * compliance with the License. A copy of the License is available at
7  * http://www.sun.com/
8  *
9  * The Original Code is NetBeans. The Initial Developer of the Original
10  * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
11  * Microsystems, Inc. All Rights Reserved.
12  */

13
14 package impl.test;
15
16 import test.*;
17 import java.util.*;
18 import org.netbeans.mdr.handlers.*;
19 import org.netbeans.mdr.storagemodel.*;
20 import javax.jmi.reflect.*;
21
22 public abstract class ProvidesImpl extends AssociationHandler implements test.Provides {
23     
24     /** Creates a new instance of ProvidesImpl */
25     public ProvidesImpl(StorableAssociation storable) {
26         super(storable);
27     }
28     
29     public boolean add(test.Service providedService, test.Component provider) {
30         if ("TestAssociationInterceptor".equals(providedService.getName()))
31             return false;
32         return super_add(providedService, provider);
33     }
34
35     public abstract boolean super_add(test.Service providedService, test.Component provider);
36
37 }
38
Popular Tags