public interface ContentHandlerI
Implementations of this interface are responsible for delegating file operations (like opening/editing a document) to the native applications associated with the respective operating system.
ARCHITECTURAL CAVEAT & LIMITATION:
Relying on OS-level delegation commands (like xdg-open on Linux,
open on macOS, or cmd /c start on Windows) means the calling
application often loses track of the actual target process. Target applications
heavily utilize IPC, D-Bus, or COM to delegate opening the file to an already
running instance, causing the initial OS command to terminate immediately with exit code 0.
Therefore, any workflow requiring a guaranteed "file closed" callback (e.g. for writing edits back to a server) cannot reliably use the process lifecycle. Such workflows must be handled via explicit UI triggers (e.g. a "Done Editing" button in the client application).
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getDocument()
Retrieves the document associated with this content handler.
|
void |
launchExternalApp()
Asynchronously launches the external, OS-native application to edit or view the document.
|
default void |
startEdit()
Deprecated.
|
default void |
waitEndEdit()
Deprecated.
|
java.io.File getDocument()
File that is being processed.void launchExternalApp()
throws java.io.IOException
java.io.IOException - If an I/O error occurs while attempting to launch the external process.@Deprecated
default void startEdit()
throws java.io.IOException
java.io.IOException@Deprecated default void waitEndEdit()
Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.