TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.fs
Class FsFilteringManager

java.lang.Object
  extended by de.schlichtherle.truezip.fs.FsManager
      extended by de.schlichtherle.truezip.fs.FsDecoratingManager<FsManager>
          extended by de.schlichtherle.truezip.fs.FsFilteringManager
All Implemented Interfaces:
Iterable<FsController<?>>

@ThreadSafe
public final class FsFilteringManager
extends FsDecoratingManager<FsManager>

Filters the list of federated file systems managed by the decorated file system manager so that their mount point starts with the prefix provided to the constructor.

Author:
Christian Schlichtherle

Field Summary
private  FsMountPoint prefix
           
 
Fields inherited from class de.schlichtherle.truezip.fs.FsDecoratingManager
delegate
 
Fields inherited from class de.schlichtherle.truezip.fs.FsManager
UMOUNT
 
Constructor Summary
FsFilteringManager(FsManager manager, FsMountPoint prefix)
          Constructs a new prefix filter file system manager from the given file system manager and mount point prefix.
 
Method Summary
private  Collection<FsController<?>> getControllers()
           
 int getSize()
          Returns the number of federated file systems managed by this instance.
 Iterator<FsController<?>> iterator()
          Returns an iterator for the controller of all federated file systems managed by this instance.
 
Methods inherited from class de.schlichtherle.truezip.fs.FsDecoratingManager
getController, sync, toString
 
Methods inherited from class de.schlichtherle.truezip.fs.FsManager
equals, hashCode, sync
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

prefix

private final FsMountPoint prefix
Constructor Detail

FsFilteringManager

public FsFilteringManager(@NonNull
                          FsManager manager,
                          @NonNull
                          FsMountPoint prefix)
Constructs a new prefix filter file system manager from the given file system manager and mount point prefix.

Parameters:
manager - the decorated file system manager.
prefix - the prefix of the mount point used to filter all federated file systems of the decorated file system manager.
Method Detail

getSize

public int getSize()
Description copied from class: FsManager
Returns the number of federated file systems managed by this instance.

Overrides:
getSize in class FsDecoratingManager<FsManager>
Returns:
The number of federated file systems managed by this instance.

iterator

public Iterator<FsController<?>> iterator()
Description copied from class: FsManager
Returns an iterator for the controller of all federated file systems managed by this instance.

Important: The iterated file system controllers must be ordered so that all file systems appear before any of their parent file systems.

Specified by:
iterator in interface Iterable<FsController<?>>
Overrides:
iterator in class FsDecoratingManager<FsManager>
Returns:
An iterator for the controller of all federated file systems managed by this instance.

getControllers

private Collection<FsController<?>> getControllers()

TrueZIP Kernel 7.0-rc2

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