public abstract class AbstractStreamSettingsResource extends AbstractResource implements ResourceView.HasStreamSettings
Modifier and Type | Field and Description |
---|---|
protected int |
bufferSize |
protected long |
cacheTime |
protected java.lang.String |
fileName |
hasSource, resource, resourceUpdateHandler
Constructor and Description |
---|
AbstractStreamSettingsResource() |
Modifier and Type | Method and Description |
---|---|
int |
getBufferSize() |
long |
getCacheTime() |
java.lang.String |
getFileName() |
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(java.lang.String fileName)
Sets the filename.
|
createResource, fireResourceUpdateEvent, getResource, hasSource, setResourceUpdatedHandler
protected long cacheTime
protected int bufferSize
protected java.lang.String fileName
public void setCacheTime(long cacheTime)
ResourceView.HasStreamSettings
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.
setCacheTime
in interface ResourceView.HasStreamSettings
cacheTime
- the cache time in millisecondspublic long getCacheTime()
getCacheTime
in interface ResourceView.HasStreamSettings
public void setBufferSize(int bufferSize)
ResourceView.HasStreamSettings
setBufferSize
in interface ResourceView.HasStreamSettings
bufferSize
- the size of the buffer in bytespublic int getBufferSize()
getBufferSize
in interface ResourceView.HasStreamSettings
public void setFileName(java.lang.String fileName)
ResourceView.HasStreamSettings
setFileName
in interface ResourceView.HasStreamSettings
fileName
- the filename to set@Nullable public java.lang.String getFileName()
getFileName
in interface ResourceView.HasStreamSettings