Package io.jmix.ui.component
Interface ResourceView.HasStreamSettings
- All Known Subinterfaces:
ClasspathResource
,FileResource
,FileStorageResource
,StreamResource
- All Known Implementing Classes:
AbstractStreamSettingsResource
,ClasspathResourceImpl
,FileResourceImpl
,FileStorageResourceImpl
,StreamResourceImpl
- Enclosing interface:
- ResourceView
public static interface ResourceView.HasStreamSettings
Marker interface to indicate that the implementing class has stream settings (such as cache time, buffer size
or file name).
-
Method Summary
Modifier and TypeMethodDescriptionint
long
void
setBufferSize
(int bufferSize) Sets the size of the download buffer used for this resource.void
setCacheTime
(long cacheTime) Sets the length of cache expiration time.void
setFileName
(String fileName) Sets the filename.
-
Method Details
-
setCacheTime
Sets the length of cache expiration time.This gives the adapter the possibility cache streams sent to the client. The caching may be made in adapter or at the client if the client supports caching. Zero or negative value disables the caching of this stream.
- Parameters:
cacheTime
- the cache time in milliseconds
-
getCacheTime
long getCacheTime()- Returns:
- resource cache time
-
setBufferSize
Sets the size of the download buffer used for this resource.- Parameters:
bufferSize
- the size of the buffer in bytes
-
getBufferSize
int getBufferSize()- Returns:
- buffer size
-
setFileName
Sets the filename.- Parameters:
fileName
- the filename to set
-
getFileName
- Returns:
- resource file name
-