KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > spi > ejbjar > CarProvider


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.spi.ejbjar;
21 import org.netbeans.modules.j2ee.api.ejbjar.Car;
22 import org.openide.filesystems.FileObject;
23
24 /**
25  * Provider interface for application client (car) modules.
26  * <p>
27  * The <code>org.netbeans.modules.j2ee.ejbapi</code> module registers an
28  * implementation of this interface to global lookup which looks for the
29  * project which owns a file (if any) and checks its lookup for this interface,
30  * and if it finds an instance, delegates to it. Therefore it is not normally
31  * necessary for a project type provider to register its own instance just to
32  * define the application client (car) module for files it owns, assuming it
33  * uses projects for implementation of application client (car) module.
34  * </p>
35  * <p> If needed a new implementation of this interface can be registered in
36  * global lookup.
37  * </p>
38  * @see Car#getCar
39  *
40  * @author Pavel Buzek
41  * @author Lukas Jungmann
42 */

43 public interface CarProvider {
44     
45     /**
46      * Find a carmodule containing a given file.
47      * @param file a file somewhere
48      * @return a carmodule, or null for no answer
49      * @see CarFactory
50      */

51     Car findCar(FileObject file);
52     
53 }
54
Popular Tags