public class PreviewFileReader extends Object
To ensure proper cleanup, shutdown()
must be called before instances are discarded.
Constructor and Description |
---|
PreviewFileReader() |
Modifier and Type | Method and Description |
---|---|
protected ThreadPoolTaskService |
createTaskService()
Called at construction time to create the
TaskService instance to be used by this
class. |
protected TaskExecutor<Void> |
getTaskExecutorFrom(TaskService taskService)
Called at construction time to retrieve the
TaskExecutor to be used by thic class. |
Document |
read(File file) |
protected void |
shutdown()
Clean-up resources allocated by this instance.
|
@CallOnEDT public PreviewFileReader()
protected ThreadPoolTaskService createTaskService()
TaskService
instance to be used by this
class.ThreadPoolTaskService
with core pool size 1 and maximum pool
size 2.protected TaskExecutor<Void> getTaskExecutorFrom(TaskService taskService)
TaskExecutor
to be used by thic class.taskService
- the instance created by createTaskService()
TaskExecutor
retrieved from the given TaskService
.protected void shutdown()
@CallOnEDT public Document read(File file)
Copyright © 2024 levigo holding gmbh. All rights reserved.