java.lang.Object
org.jboss.vfs.util.automount.Automounter
Utility used to manage mounting Virtual FileSystems.
- Author:
- John Bailey
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddHandle(VirtualFile owner, Closeable handle) Add handle to owner, to be auto closed.static voidCleanup all references from the owner.static voidcleanup(MountOwner owner) Cleanup all references from theMountOwner.static voidcleanup(VirtualFile owner) Cleanup all references from the owner.static booleanisMounted(VirtualFile target) Determines whether a targetVirtualFileis mounted.static voidmount(Object owner, VirtualFile target, MountOption... mountOptions) Mount providedVirtualFile(if not mounted) and add an owner entry.static voidmount(MountOwner owner, VirtualFile target, MountOption... mountOptions) Mount providedVirtualFile(if not mounted) and add an owner entry.static voidmount(VirtualFile target, MountOption... mountOptions) Mount providedVirtualFile(if not mounted) and set the owner to be the provided target.static voidmount(VirtualFile owner, VirtualFile target, MountOption... mountOptions) Mount providedVirtualFile(if not mounted) and add an owner entry.static booleanremoveHandle(VirtualFile owner, Closeable handle) Remove handle from owner.
-
Method Details
-
mount
Mount providedVirtualFile(if not mounted) and set the owner to be the provided target. (Self owned mount)- Parameters:
target- VirtualFile to mountmountOptions- optional configuration to use for mounting- Throws:
IOException- when the target can not be mounted.
-
mount
public static void mount(Object owner, VirtualFile target, MountOption... mountOptions) throws IOException Mount providedVirtualFile(if not mounted) and add an owner entry. Also creates a back-reference to from the owner to the target.- Parameters:
owner- Object that owns the reference to the mounttarget- VirtualFile to mountmountOptions- optional configuration to use for mounting- Throws:
IOException- when the target can not be mounted.
-
mount
public static void mount(VirtualFile owner, VirtualFile target, MountOption... mountOptions) throws IOException Mount providedVirtualFile(if not mounted) and add an owner entry. Also creates a back-reference to from the owner to the target.- Parameters:
owner- VirtualFile that owns the reference to the mounttarget- VirtualFile to mountmountOptions- optional configuration to use for mounting- Throws:
IOException- when the target can not be mounted.
-
mount
public static void mount(MountOwner owner, VirtualFile target, MountOption... mountOptions) throws IOException Mount providedVirtualFile(if not mounted) and add an owner entry. Also creates a back-reference to from the owner to the target.- Parameters:
owner- MountOwner that owns the reference to the mounttarget- VirtualFile to mountmountOptions- optional configuration to use for mounting- Throws:
IOException- when the target can not be mounted
-
addHandle
Add handle to owner, to be auto closed.- Parameters:
owner- the handle ownerhandle- the handle- Returns:
- add result
-
removeHandle
Remove handle from owner.- Parameters:
owner- the handle ownerhandle- the handle- Returns:
- remove result
-
cleanup
Cleanup all references from the owner. Cleanup any mounted entries that become un-referenced in the process.- Parameters:
owner-Objectto cleanup references for
-
cleanup
Cleanup all references from the owner. Cleanup any mounted entries that become un-referenced in the process.- Parameters:
owner-Objectto cleanup references for
-
cleanup
Cleanup all references from theMountOwner. Cleanup any mounted entries that become un-referenced in the process.- Parameters:
owner-MountOwnerto cleanup references for
-
isMounted
Determines whether a targetVirtualFileis mounted.- Parameters:
target- target to check- Returns:
- true if mounted, false otherwise
-