TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.fs.sl
Class FsDriverLocator

java.lang.Object
  extended by de.schlichtherle.truezip.fs.sl.FsDriverLocator
All Implemented Interfaces:
FsDriverProvider

@Immutable
@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public final class FsDriverLocator
extends Object
implements FsDriverProvider

Locates all file system drivers found on the class path. The map of file system drivers is populated by instantiating all classes which are named in the resource files with the name "META-INF/services/de.schlichtherle.truezip.fs.spi.FsDriverService" on the class path by calling their no-arg constructor.

If no file system drivers are found, a ServiceConfigurationError is thrown.

Author:
Christian Schlichtherle

Field Summary
private  Map<FsScheme,FsDriver> drivers
           
static FsDriverLocator SINGLETON
          The singleton instance of this class.
 
Constructor Summary
private FsDriverLocator()
          You cannot instantiate this class.
 
Method Summary
 Map<FsScheme,FsDriver> get()
          Returns an immutable map of file system schemes to drivers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLETON

public static final FsDriverLocator SINGLETON
The singleton instance of this class.


drivers

private final Map<FsScheme,FsDriver> drivers
Constructor Detail

FsDriverLocator

private FsDriverLocator()
You cannot instantiate this class.

Method Detail

get

public Map<FsScheme,FsDriver> get()
Description copied from interface: FsDriverProvider
Returns an immutable map of file system schemes to drivers. While the key of the returned map need not be null, its values must be nullable.

Calling this method several times should return a map which compares equal to each other in order to ensure a consistent file system implementation scheme.

Specified by:
get in interface FsDriverProvider
Returns:
An immutable map of file system schemes to drivers.

TrueZIP Kernel 7.0-rc2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.