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
FieldsFields inherited from class io.jmix.ui.component.impl.AbstractResource
hasSource, resource, resourceUpdateHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlongvoidsetBufferSize(int bufferSize) Sets the size of the download buffer used for this resource.voidsetCacheTime(long cacheTime) Sets the length of cache expiration time.voidsetFileName(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.HasStreamSettingsSets 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:
setCacheTimein interfaceResourceView.HasStreamSettings- Parameters:
cacheTime- the cache time in milliseconds
-
getCacheTime
public long getCacheTime()- Specified by:
getCacheTimein interfaceResourceView.HasStreamSettings- Returns:
- resource cache time
-
setBufferSize
public void setBufferSize(int bufferSize) Description copied from interface:ResourceView.HasStreamSettingsSets the size of the download buffer used for this resource.- Specified by:
setBufferSizein interfaceResourceView.HasStreamSettings- Parameters:
bufferSize- the size of the buffer in bytes
-
getBufferSize
public int getBufferSize()- Specified by:
getBufferSizein interfaceResourceView.HasStreamSettings- Returns:
- buffer size
-
setFileName
Description copied from interface:ResourceView.HasStreamSettingsSets the filename.- Specified by:
setFileNamein interfaceResourceView.HasStreamSettings- Parameters:
fileName- the filename to set
-
getFileName
- Specified by:
getFileNamein interfaceResourceView.HasStreamSettings- Returns:
- resource file name
-