TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.fs.spi
Class FsDriverService

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

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

An abstract locatable service 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
FsDriverService()
           
 
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.FsDriverProvider
get
 

Constructor Detail

FsDriverService

public FsDriverService()
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 FsDriverProvider interface for convenient creation of the map to return by their FsDriverProvider.get() 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 FsDriverProvider.get().
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-rc2

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