Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.gjt.sp.jedit.io
Class VFSManager  view VFSManager download VFSManager.java

java.lang.Object
  extended byorg.gjt.sp.jedit.io.VFSManager

public class VFSManager
extends java.lang.Object

jEdit's virtual filesystem allows it to transparently edit files stored elsewhere than the local filesystem, for example on an FTP site. See the VFS class for implementation details.

Version:
$Id: VFSManager.java,v 1.13 2003/10/15 01:08:52 spestov Exp $

Nested Class Summary
(package private) static class VFSManager.SendVFSUpdatesSafely
           
 
Field Summary
private static boolean error
           
private static java.lang.Object errorLock
           
private static java.util.Vector errors
           
private static VFS fileVFS
           
private static org.gjt.sp.util.WorkThreadPool ioThreadPool
           
private static java.util.Hashtable protocolHash
           
static java.lang.String SERVICE
          The service type.
private static VFS urlVFS
           
private static java.util.Hashtable vfsHash
           
private static java.lang.Object vfsUpdateLock
           
private static java.util.List vfsUpdates
           
 
Constructor Summary
private VFSManager()
           
 
Method Summary
static void error(java.awt.Component comp, java.lang.String error, java.lang.Object[] args)
          Deprecated. Call the other error() method instead.
static void error(java.awt.Component comp, java.lang.String path, java.lang.String messageProp, java.lang.Object[] args)
          Reports an I/O error.
static boolean errorOccurred()
          Returns if the last request caused an error.
static java.util.Enumeration getFilesystems()
          Deprecated. Use getVFSs() instead.
static VFS getFileVFS()
          Returns the local filesystem VFS.
static org.gjt.sp.util.WorkThreadPool getIOThreadPool()
          Returns the I/O thread pool.
static int getRequestCount()
          Returns the number of pending I/O requests.
static VFS getUrlVFS()
          Returns the URL VFS.
static VFS getVFSByName(java.lang.String name)
          Deprecated. Use getVFSForProtocol() instead.
static VFS getVFSForPath(java.lang.String path)
          Returns the VFS for the specified path.
static VFS getVFSForProtocol(java.lang.String protocol)
          Returns the VFS for the specified protocol.
static java.lang.String[] getVFSs()
          Returns a list of all registered filesystems.
static void init()
          Do not call.
static void registerVFS(java.lang.String protocol, VFS vfs)
          Deprecated. Write a services.xml file instead; see org.gjt.sp.jedit.ServiceManager.
static void runInAWTThread(java.lang.Runnable run)
          Executes the specified runnable in the AWT thread once all pending I/O requests are complete.
static void runInWorkThread(java.lang.Runnable run)
          Executes the specified runnable in one of the I/O threads.
static void sendVFSUpdate(VFS vfs, java.lang.String path, boolean parent)
          Sends a VFS update message.
static void start()
          Do not call.
static void waitForRequests()
          Returns when all pending requests are complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE

public static final java.lang.String SERVICE
The service type. See org.gjt.sp.jedit.ServiceManager.

Since:
jEdit 4.2pre1
See Also:
Constant Field Values

ioThreadPool

private static org.gjt.sp.util.WorkThreadPool ioThreadPool

fileVFS

private static VFS fileVFS

urlVFS

private static VFS urlVFS

vfsHash

private static java.util.Hashtable vfsHash

protocolHash

private static java.util.Hashtable protocolHash

error

private static boolean error

errorLock

private static java.lang.Object errorLock

errors

private static java.util.Vector errors

vfsUpdateLock

private static java.lang.Object vfsUpdateLock

vfsUpdates

private static java.util.List vfsUpdates
Constructor Detail

VFSManager

private VFSManager()
Method Detail

init

public static void init()
Do not call.


start

public static void start()
Do not call.


getFileVFS

public static VFS getFileVFS()
Returns the local filesystem VFS.

Since:
jEdit 2.5pre1

getUrlVFS

public static VFS getUrlVFS()
Returns the URL VFS.

Since:
jEdit 2.5pre1

getVFSByName

public static VFS getVFSByName(java.lang.String name)
Deprecated. Use getVFSForProtocol() instead.


getVFSForProtocol

public static VFS getVFSForProtocol(java.lang.String protocol)
Returns the VFS for the specified protocol.

Since:
jEdit 2.5pre1

getVFSForPath

public static VFS getVFSForPath(java.lang.String path)
Returns the VFS for the specified path.

Since:
jEdit 2.6pre4

registerVFS

public static void registerVFS(java.lang.String protocol,
                               VFS vfs)
Deprecated. Write a services.xml file instead; see org.gjt.sp.jedit.ServiceManager.


getFilesystems

public static java.util.Enumeration getFilesystems()
Deprecated. Use getVFSs() instead.


getVFSs

public static java.lang.String[] getVFSs()
Returns a list of all registered filesystems.

Since:
jEdit 4.2pre1

getIOThreadPool

public static org.gjt.sp.util.WorkThreadPool getIOThreadPool()
Returns the I/O thread pool.


waitForRequests

public static void waitForRequests()
Returns when all pending requests are complete.

Since:
jEdit 2.5pre1

errorOccurred

public static boolean errorOccurred()
Returns if the last request caused an error.


getRequestCount

public static int getRequestCount()
Returns the number of pending I/O requests.


runInAWTThread

public static void runInAWTThread(java.lang.Runnable run)
Executes the specified runnable in the AWT thread once all pending I/O requests are complete.

Since:
jEdit 2.5pre1

runInWorkThread

public static void runInWorkThread(java.lang.Runnable run)
Executes the specified runnable in one of the I/O threads.

Since:
jEdit 2.6pre2

error

public static void error(java.awt.Component comp,
                         java.lang.String error,
                         java.lang.Object[] args)
Deprecated. Call the other error() method instead.


error

public static void error(java.awt.Component comp,
                         java.lang.String path,
                         java.lang.String messageProp,
                         java.lang.Object[] args)
Reports an I/O error.

Since:
jEdit 4.0pre3

sendVFSUpdate

public static void sendVFSUpdate(VFS vfs,
                                 java.lang.String path,
                                 boolean parent)
Sends a VFS update message.

Since:
jEdit 2.6pre4