- All Superinterfaces:
AutoCloseable
,Resource
- All Known Implementing Classes:
AbstractAsyncResource
,ClasspathResource
,FileResource
,JarResource
,ModuleResource
,NativeResource
,PathResource
,URLResource
,ZipResource
An async resource uses an executor service to be read and written asynchronously.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the executor service.void
setExecutor
(ExecutorService executor) Sets the executor service to use when reading or writing the resource asynchronously.Methods inherited from interface io.inverno.mod.base.resource.Resource
close, delete, exists, getFilename, getMediaType, getURI, isFile, lastModified, openReadableByteChannel, openWritableByteChannel, openWritableByteChannel, openWritableByteChannel, read, resolve, resolve, size, write, write, write
-
Method Details
-
setExecutor
Sets the executor service to use when reading or writing the resource asynchronously.
- Parameters:
executor
- the executor service to set
-
getExecutor
ExecutorService getExecutor()Returns the executor service.
- Returns:
- an executor service
-