KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > masterfs > providers > FileSystemProvider


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.masterfs.providers;
21
22 import org.netbeans.modules.masterfs.providers.AutoMountProvider;
23
24 /**
25  *
26  * An object that implements FileSystemProvider have chance to affect behaviour of
27  * MasterFileSystem. MasterFileSystem delegates its functionality to mounted FileSystems.
28  * So, behaviour of MasterFileSystem can be affected easily by mounting its own
29  * implemenation of FileSystem.
30  *
31  * <P>There are two ways how to mount FileSystem into MasterFileSystem:
32  * <UL>
33  * <LI> <b>automatic mounting</b> means,
34  * that there is not necessary to call MountSupport
35  * to mount filesystem into MasterFileSystem. On the contrary MasterFileSystem
36  * invokes individual AutoMountProviders to obtain instance of FileSystem, that should
37  * be mounted. Then {@link org.netbeans.modules.masterfs.providers.AutoMountProvider}
38  * must be able to return best suited filesystem for passed mount point or null.
39  *
40
41  * </LI>
42  * <LI> <b>user mounting</b> is simply {@link org.netbeans.modules.masterfs.providers.MountSupport},
43  * which is API, that has two methods mount and unmount.
44  * </LI>
45  * </UL> <P>
46  *
47  *
48  * @see org.netbeans.modules.masterfs.providers.MountSupport
49  * @see org.netbeans.modules.masterfs.providers.AutoMountProvider
50  * @author rm111737
51  */

52 public abstract interface FileSystemProvider {
53     /**
54      * Implementation of method initialize may support:
55      * <UL>
56      * <LI> <b>automatic mounting</b>, then method initialize mustn't return null. </LI>
57      * <LI> <b>user mounting</b>, then MountSupport passed to method initalize needs to be kept.</LI>
58      * <LI> both above mentioned</LI>
59      * </UL>
60      * @param mSupport instance of MountSupport provided by MasterFileSystem
61      * @return instance of AutoMountProvider if there is supported <b>automatic mounting</b>
62      */

63     public abstract AutoMountProvider initialize (MountSupport mSupport);
64
65 }
66
Popular Tags