TrueZIP Kernel 7.0-rc1

de.schlichtherle.truezip.fs.spi
Class FsDriverProvider

java.lang.Object
  extended by de.schlichtherle.truezip.fs.spi.FsDriverProvider
All Implemented Interfaces:
FsDriverService

@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public abstract class FsDriverProvider
extends Object
implements FsDriverService

An abstract locatable service provider for a map of file system schemes to file system drivers. Implementations of this abstract class are subject to service location by the class FsDriverLocator.

Implementations must be thread-safe.

Author:
Christian Schlichtherle

Constructor Summary
FsDriverProvider()
           
 
Method Summary
static Map<FsScheme,FsDriver> newMap(Object[][] config)
          A static factory method for an unmodifiable driver map which is constructed from the given configuration.
private static FsDriver toDriver(Object driver)
           
private static Collection<FsScheme> toSchemes(Object o)
           
 String toString()
          Returns a string representation of this object for debugging and logging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.schlichtherle.truezip.fs.FsDriverService
getDrivers
 

Constructor Detail

FsDriverProvider

public FsDriverProvider()
Method Detail

toString

public String toString()
Returns a string representation of this object for debugging and logging purposes.

Overrides:
toString in class Object

newMap

public static Map<FsScheme,FsDriver> newMap(Object[][] config)
A static factory method for an unmodifiable driver map which is constructed from the given configuration. This method is intended to be used by provider implementations of the FsDriverService interface for convenient creation of the map to return by their FsDriverService.getDrivers() method.

Parameters:
config - an array of key-value pair arrays. The first element of each inner array must either be a file system scheme, an object o which can get converted to a set of file system suffixes by calling new SuffixSet(o.toString()) or a collection of these. The second element of each inner array must either be a file system driver object, a file system driver class, a fully qualified name of a file system driver class, or null.
Returns:
The new map to use as the return value of FsDriverService.getDrivers().
Throws:
NullPointerException - if a required configuration element is null.
IllegalArgumentException - if any other parameter precondition does not hold.
See Also:
Syntax contraints for suffix lists.

toSchemes

@NonNull
private static Collection<FsScheme> toSchemes(@NonNull
                                                      Object o)

toDriver

@CheckForNull
private static FsDriver toDriver(@CheckForNull
                                              Object driver)

TrueZIP Kernel 7.0-rc1

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