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[]closeablesprivate FileSystemfileSystemprivate java.io.CloseablemountHandle
-
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 voidclose()java.io.FilegetMountSource()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:MountHandleGet the source file used for the mount.- Specified by:
getMountSourcein interfaceMountHandle- Returns:
- the source file
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-