@ThreadSafe final class FsFederatingController extends FsDecoratingController<FsModel,FsController<?>>
FsFalsePositiveExceptions thrown by the prospective file system
provided to its constructor.
Whenever the controller for the prospective file system throws a
FsFalsePositiveException, the method call is delegated to the
controller for its parent file system in order to resolve the requested
operation.| Modifier and Type | Class and Description |
|---|---|
private class |
FsFederatingController.Input |
private class |
FsFederatingController.Output |
| Modifier and Type | Field and Description |
|---|---|
private FsPath |
path |
delegate| Constructor and Description |
|---|
FsFederatingController(FsController<?> controller)
Constructs a new file system federating controller.
|
| Modifier and Type | Method and Description |
|---|---|
Icon |
getClosedIcon() |
FsEntry |
getEntry(FsEntryName name)
Returns a file system entry or
null if no file system entry
exists for the given name. |
InputSocket<?> |
getInputSocket(FsEntryName name,
BitField<FsInputOption> options)
Returns an input socket for reading the contents of the file system
entry addressed by the given name from the file system.
|
Icon |
getOpenIcon() |
OutputSocket<?> |
getOutputSocket(FsEntryName name,
BitField<FsOutputOption> options,
Entry template)
Returns an output socket for writing the contents of the entry addressed
by the given name to the file system.
|
private FsPath |
getPath() |
boolean |
isReadable(FsEntryName name) |
boolean |
isReadOnly() |
boolean |
isWritable(FsEntryName name) |
void |
mknod(FsEntryName name,
Entry.Type type,
BitField<FsOutputOption> options,
Entry template)
Creates or replaces and finally links a chain of one or more entries
for the given entry
name into the file system. |
private FsEntryName |
resolveParent(FsEntryName name) |
void |
setReadOnly(FsEntryName name) |
boolean |
setTime(FsEntryName name,
BitField<Entry.Access> types,
long value)
Makes an attempt to set the last access time of all types in the given
bit field for the file system entry with the given name.
|
void |
unlink(FsEntryName name) |
getModel, getParent, sync, toStringequals, hashCode, syncprivate volatile FsPath path
FsFederatingController(@NonNull
FsController<?> controller)
controller - the decorated file system controller.private FsEntryName resolveParent(FsEntryName name)
private FsPath getPath()
public Icon getOpenIcon() throws IOException
getOpenIcon in class FsDecoratingController<FsModel,FsController<?>>IOExceptionpublic Icon getClosedIcon() throws IOException
getClosedIcon in class FsDecoratingController<FsModel,FsController<?>>IOExceptionpublic boolean isReadOnly()
throws IOException
isReadOnly in class FsDecoratingController<FsModel,FsController<?>>IOExceptionpublic FsEntry getEntry(FsEntryName name) throws IOException
FsControllernull if no file system entry
exists for the given name.
Modifying the returned object graph is either not supported (i.e. throws
an UnsupportedOperationException) or does not show any
effect on the file system.getEntry in class FsDecoratingController<FsModel,FsController<?>>name - the name of the file system entry to look up.null if no file system entry
exists for the given name.IOException - on any I/O error.public boolean isReadable(FsEntryName name) throws IOException
isReadable in class FsDecoratingController<FsModel,FsController<?>>IOExceptionpublic boolean isWritable(FsEntryName name) throws IOException
isWritable in class FsDecoratingController<FsModel,FsController<?>>IOExceptionpublic void setReadOnly(FsEntryName name) throws IOException
setReadOnly in class FsDecoratingController<FsModel,FsController<?>>IOExceptionpublic boolean setTime(FsEntryName name, BitField<Entry.Access> types, long value) throws IOException
FsControllerfalse is returned or an IOException is thrown, then
still some of the last access times may have been set.
In other words, this is not an atomic operation if multiple access types
are given.
To make this operation atomic, set the last access time for a single
type only.setTime in class FsDecoratingController<FsModel,FsController<?>>name - the file system entry name.types - the access typesvalue - the last access time.true if and only if setting the access time for all
types in types succeeded.IOException - on any I/O error.public InputSocket<?> getInputSocket(FsEntryName name, BitField<FsInputOption> options)
FsControllergetInputSocket in class FsDecoratingController<FsModel,FsController<?>>name - the file system entry name.options - the input options.InputSocket.public OutputSocket<?> getOutputSocket(FsEntryName name, BitField<FsOutputOption> options, Entry template)
FsControllertemplate is not null, then the output entry shall
have as many of its properties copied as reasonable, e.g. the last
modification time.getOutputSocket in class FsDecoratingController<FsModel,FsController<?>>name - a file system entry name.options - a bit field of output options.template - a nullable template for the properties of the output
entry.OutputSocket.public void mknod(@NonNull
FsEntryName name,
@NonNull
Entry.Type type,
@NonNull
BitField<FsOutputOption> options,
@CheckForNull
Entry template)
throws IOException
FsControllername into the file system.mknod in class FsDecoratingController<FsModel,FsController<?>>name - the file system entry name.type - the file system entry type.options - the file system output options.
If CREATE_PARENTS is set, any missing parent directories
will be created and linked into this file system with its last
modification time set to the system's current time.template - if not null, then the file system entry
at the end of the chain shall inherit as much properties from
this entry as possible - with the exception of its name and type.IOException - on any I/O error, including but not limited to these
reasons:
name contains characters which are not
supported by the file system.
FsOutputOption.EXCLUSIVE is set or the entry is a
directory.
createParents is
false.
public void unlink(FsEntryName name) throws IOException
unlink in class FsDecoratingController<FsModel,FsController<?>>IOExceptionCopyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.