Package org.jboss.vfs
Class BasicMountHandle
- java.lang.Object
-
- org.jboss.vfs.BasicMountHandle
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,MountHandle
class BasicMountHandle extends java.lang.Object implements MountHandle
MountHandle implementation. Provides the default behavior of delegating to the FileSystem to get the mount source as well as cleaning up resources.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Closeable[]
closeables
private FileSystem
fileSystem
private java.io.Closeable
mountHandle
-
Constructor Summary
Constructors Constructor Description BasicMountHandle(FileSystem fileSystem, java.io.Closeable mountHandle, java.io.Closeable... additionalCloseables)
Create new DefaultMountHandle with a FileSystem and an array of closeable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.io.File
getMountSource()
Get the source file used for the mount.
-
-
-
Field Detail
-
fileSystem
private final FileSystem fileSystem
-
mountHandle
private final java.io.Closeable mountHandle
-
closeables
private final java.io.Closeable[] closeables
-
-
Constructor Detail
-
BasicMountHandle
BasicMountHandle(FileSystem fileSystem, java.io.Closeable mountHandle, java.io.Closeable... additionalCloseables)
Create new DefaultMountHandle with a FileSystem and an array of closeable.- Parameters:
fileSystem
- to use to retrieve the mount sourcemountHandle
- the handle to close the actual mountadditionalCloseables
- addition Closeable to execute on close
-
-
Method Detail
-
getMountSource
public java.io.File getMountSource()
Description copied from interface:MountHandle
Get the source file used for the mount.- Specified by:
getMountSource
in interfaceMountHandle
- Returns:
- the source file
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-