@Immutable public class HttpController extends FsAbstractController
FsController.Factory<Context>| Modifier and Type | Method and Description |
|---|---|
void |
checkAccess(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.shed.BitField<net.java.truecommons.cio.Entry.Access> types)
Checks if the file system node for the given
name exists when
constrained by the given access options and permits the given
access types. |
FsController |
getParent()
Returns the controller for the parent file system or
null if
and only if this file system is not federated, i.e. |
net.java.truecommons.cio.InputSocket<?> |
input(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Returns an input socket for reading the contents of the file system
node addressed by the given name from the file system.
|
void |
make(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.cio.Entry.Type type,
net.java.truecommons.cio.Entry template)
Creates or replaces and finally links a chain of one or more entries
for the given node
name into the file system. |
protected HttpNode |
newEntry(FsNodeName name) |
HttpNode |
node(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Returns the file system node for the given
name or null
if it doesn't exist. |
net.java.truecommons.cio.OutputSocket<?> |
output(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.cio.Entry template)
Returns an output socket for writing the contents of the node addressed
by the given name to the file system.
|
void |
setReadOnly(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Sets the named file system node as read-only.
|
boolean |
setTime(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.shed.BitField<net.java.truecommons.cio.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 node with the given name.
|
void |
sync(net.java.truecommons.shed.BitField<FsSyncOption> options)
Commits all unsynchronized changes to the contents of this file system
to its parent file system,
releases the associated resources (e.g.
|
void |
unlink(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Removes the named file system node from the file system.
|
getModel, getMountPoint, isMounted, setMounted, setTime, toStringpublic void checkAccess(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, net.java.truecommons.shed.BitField<net.java.truecommons.cio.Entry.Access> types) throws IOException
FsControllername exists when
constrained by the given access options and permits the given
access types.options - the options for accessing the file system node.name - the name of the file system node.types - the types of the desired access.IOException - on any I/O error.public FsController getParent()
FsControllernull if
and only if this file system is not federated, i.e. not a member of
another file system.
Multiple invocations must return the same object.public net.java.truecommons.cio.InputSocket<?> input(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name)
FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.InputSocket.public void make(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, net.java.truecommons.cio.Entry.Type type, @CheckForNull net.java.truecommons.cio.Entry template) throws IOException
FsControllername into the file system.options - the options for accessing the file system node.
If FsAccessOption.CREATE_PARENTS is set, any missing
parent directories shall get created with an undefined last
modification time.name - the name of the file system node.type - the file system node type.template - if not null, then the file system node
at the end of the chain shall inherit as much properties from
this node 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.
FsAccessOption.EXCLUSIVE is set or the node is a
directory.
createParents is
false.
protected HttpNode newEntry(FsNodeName name)
public HttpNode node(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name) throws IOException
FsControllername or null
if it doesn't exist.
Modifying the returned node does not show any effect on the file system
and should result in an UnsupportedOperationException.options - the options for accessing the file system node.name - the name of the file system node.null if no file system node
exists for the given name.IOException - on any I/O error.public net.java.truecommons.cio.OutputSocket<?> output(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, @CheckForNull net.java.truecommons.cio.Entry template)
FsControlleroptions - the options for accessing the file system node.
If FsAccessOption.CREATE_PARENTS is set, any missing
parent directories shall get created with an undefined last
modification time.name - the name of the file system node.template - if not null, then the file system node
at the end of the chain shall inherit as much properties from
this node as possible - with the exception of its name and type.OutputSocket.public void setReadOnly(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name) throws IOException
FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.IOException - on any I/O error or if this operation is not
supported.public boolean setTime(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, net.java.truecommons.shed.BitField<net.java.truecommons.cio.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.options - the options for accessing the file system node.name - the name of the file system node.types - the access types.value - 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 void sync(net.java.truecommons.shed.BitField<FsSyncOption> options)
FsControllerAn implementation may ignore calls to this method if its stateless.
options - the options for synchronizing the file system.public void unlink(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name) throws IOException
FsControlleroptions - the options for accessing the file system node.name - the name of the file system node.IOException - on any I/O error.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.