@Immutable public abstract class FsAbstractCompositeDriver extends Object implements FsCompositeDriver, net.java.truecommons.services.Container<Map<FsScheme,FsDriver>>
newController(net.java.truevfs.kernel.spec.FsManager, net.java.truevfs.kernel.spec.FsModel, net.java.truevfs.kernel.spec.FsController)
which uses
the file system driver map returned by Container.get()
to lookup the
appropriate driver for the scheme of any given mount point.
Subclasses should be immutable, too.
Constructor and Description |
---|
FsAbstractCompositeDriver() |
Modifier and Type | Method and Description |
---|---|
FsController |
newController(FsManager context,
FsModel model,
FsController parent)
Returns a new file system controller for the mount point of the
given file system model.
|
FsModel |
newModel(FsManager context,
FsMountPoint mountPoint,
FsModel parent)
Returns a new file system model for the given mount point.
|
public final FsController newController(FsManager context, FsModel model, @CheckForNull FsController parent) throws ServiceConfigurationError
FsCompositeDriver
When called, you may assert the following precondition:
assert null == parent
? null == model.getParent()
: parent.getModel().equals(model.getParent())
The file system controller gets created by using a
file system driver
which gets looked up by querying the
scheme of the mount point of the given file system model with the
expression model.getMountPoint().getScheme()
.
newController
in interface FsCompositeDriver
newController
in interface FsController.Factory<FsManager>
context
- the calling context.model
- the file system model.parent
- the nullable parent file system controller.ServiceConfigurationError
- if no appropriate file system driver
is known for the scheme of the mount point of the given model.public final FsModel newModel(FsManager context, FsMountPoint mountPoint, FsModel parent)
FsCompositeDriver
When called, you may assert the following precondition:
assert null == parent
? null == mountPoint.getParent()
: parent.getMountPoint().equals(mountPoint.getParent());
The file system model gets created by using a
file system driver
which gets looked up by querying the
scheme of the given mount point with the
expression mountPoint.getScheme()
.
newModel
in interface FsCompositeDriver
newModel
in interface FsModel.Factory<FsManager>
context
- the calling context.mountPoint
- the mount point of the file system.parent
- the nullable parent file system model.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.