Package org.jboss.vfs

Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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 source
        mountHandle - the handle to close the actual mount
        additionalCloseables - 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 interface MountHandle
        Returns:
        the source file
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException