Package io.jmix.ui.component.impl
Class AbstractStreamSettingsResource
java.lang.Object
io.jmix.ui.component.impl.AbstractResource
io.jmix.ui.component.impl.AbstractStreamSettingsResource
- All Implemented Interfaces:
WebResource
,Resource
,ResourceView.HasStreamSettings
- Direct Known Subclasses:
ClasspathResourceImpl
,FileResourceImpl
,FileStorageResourceImpl
,StreamResourceImpl
public abstract class AbstractStreamSettingsResource
extends AbstractResource
implements ResourceView.HasStreamSettings
-
Field Summary
Fields inherited from class io.jmix.ui.component.impl.AbstractResource
hasSource, resource, resourceUpdateHandler
-
Constructor Summary
-
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.Methods inherited from class io.jmix.ui.component.impl.AbstractResource
createResource, fireResourceUpdateEvent, getResource, hasSource, setResourceUpdatedHandler
-
Field Details
-
cacheTime
protected long cacheTime -
bufferSize
protected int bufferSize -
fileName
-
-
Constructor Details
-
AbstractStreamSettingsResource
public AbstractStreamSettingsResource()
-
-
Method Details
-
setCacheTime
public void setCacheTime(long cacheTime) Description copied from interface:ResourceView.HasStreamSettings
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.
- Specified by:
setCacheTime
in interfaceResourceView.HasStreamSettings
- Parameters:
cacheTime
- the cache time in milliseconds
-
getCacheTime
public long getCacheTime()- Specified by:
getCacheTime
in interfaceResourceView.HasStreamSettings
- Returns:
- resource cache time
-
setBufferSize
public void setBufferSize(int bufferSize) Description copied from interface:ResourceView.HasStreamSettings
Sets the size of the download buffer used for this resource.- Specified by:
setBufferSize
in interfaceResourceView.HasStreamSettings
- Parameters:
bufferSize
- the size of the buffer in bytes
-
getBufferSize
public int getBufferSize()- Specified by:
getBufferSize
in interfaceResourceView.HasStreamSettings
- Returns:
- buffer size
-
setFileName
Description copied from interface:ResourceView.HasStreamSettings
Sets the filename.- Specified by:
setFileName
in interfaceResourceView.HasStreamSettings
- Parameters:
fileName
- the filename to set
-
getFileName
- Specified by:
getFileName
in interfaceResourceView.HasStreamSettings
- Returns:
- resource file name
-