站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

AutoMountProvider (Master Filesystem) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.masterfs/1 1.11

org.netbeans.modules.masterfs.providers
Class AutoMountProvider

java.lang.Object
  extended by org.netbeans.modules.masterfs.providers.AutoMountProvider

public abstract class AutoMountProvider
extends Object

An object that implements AutoMountProvider is called from MasterFileSystem and can affect behaviour of MasterFileSystem. MasterFileSystem invokes individual AutoMountProviders to obtain instance of FileSystem for defined mount point (see createFileSystem(java.lang.String)). If there exists at least one implementation of AutoMountProvider, which returns non null FileSystem, then such FileSystem is mounted into MasterFileSystem. This mechanism can be called automatic mounting. So, AutoMountProvide must implement logic where (which mount point) and what to mount (which FileSystem implementation) into MasterFileSystem.

See Also:
FileSystemProvider.initialize(org.netbeans.modules.masterfs.providers.MountSupport), MountSupport

Constructor Summary
AutoMountProvider()
           
 
Method Summary
abstract  FileSystem createFileSystem(String mountPoint)
          Provides filesystem with root defined by mountPoint or return null.
 Image getIcon(String mountPoint, int iconType)
          Gets icon for filesystem with root defined by mountPoint or null.
abstract  boolean isRootOfFileSystem(String mountPoint)
          If method method isRootOfFileSystem returns false for the same mountPoint, then method createFileSystem must return null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoMountProvider

public AutoMountProvider()
Method Detail

createFileSystem

public abstract FileSystem createFileSystem(String mountPoint)
                                     throws IOException,
                                            PropertyVetoException
Provides filesystem with root defined by mountPoint or return null. If method method isRootOfFileSystem returns false for the same mountPoint, then method createFileSystem must return null. And if method isRootOfFileSystem returns true, then method createFileSystem mustn't return null.

Parameters:
mountPoint - corresponds to java.io.File.getAbstractPath But be aware, that this doesn't mean, that such file must really exist. mountPoint may also address virtual location.
Returns:
instance of FileSystem or null. FileObject hierarchy within a delegate FileSystem must precisely match the File hierarchy and must not hide any files which exist on disk.
Throws:
IOException
PropertyVetoException

isRootOfFileSystem

public abstract boolean isRootOfFileSystem(String mountPoint)
If method method isRootOfFileSystem returns false for the same mountPoint, then method createFileSystem must return null. And if method isRootOfFileSystem returns true, then method createFileSystem mustn't return null.

Parameters:
mountPoint - corresponds to java.io.File.getAbstractPath But be aware, that this doesn't mean, that such file must really exist. mountPoint may also address virtual location.
Returns:
true if mountPoint is expected to be root of FileSystem, that provides method createFileSystem(java.lang.String)

getIcon

public Image getIcon(String mountPoint,
                     int iconType)
Gets icon for filesystem with root defined by mountPoint or null. Null can be returned only if method isRootOfFileSystem returns false for the same mountPoint.

Parameters:
mountPoint - corresponds to java.io.File.getAbstractPath But be aware, that this doesn't mean, that such file must really exist. mountPoint may also address virtual location.
iconType - constant to indicate icon (@see BeanInfo)
Returns:
filesystem icon for filesystem with root defined by mountPoint or null

org.netbeans.modules.masterfs/1 1.11

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.