com.vaadin.terminal.
Interface ApplicationResource
All Superinterfaces:
All Known Implementing Classes:
- extends Resource, Serializable
public interface ApplicationResource
This interface must be implemented by classes wishing to provide Application resources.
ApplicationResource
are a set of named resources (pictures,
sounds, etc) associated with some specific application. Having named
application resources provides a convenient method for having inter-theme
common resources for an application.
Since:
3.0
Version:
6.8.18
Author:
Vaadin Ltd.
Field Summary | |
---|---|
static long |
DEFAULT_CACHETIME
Default cache time. |
Method Summary | |
---|---|
Application |
getApplication()
Gets the application of the resource. |
int |
getBufferSize()
Gets the size of the download buffer used for this resource. |
long |
getCacheTime()
Gets the length of cache expiration time. |
String |
getFilename()
Gets the virtual filename for this resource. |
DownloadStream |
getStream()
Gets resource as stream. |
Methods inherited from interface com.vaadin.terminal.Resource |
---|
getMIMEType |
Field Detail |
---|
DEFAULT_CACHETIME
static final long DEFAULT_CACHETIME
- See Also:
- Constant Field Values
Default cache time.
Method Detail |
---|
getStream
DownloadStream getStream()
Gets resource as stream.
getApplication
Application getApplication()
Gets the application of the resource.
getFilename
String getFilename()
- Returns:
- the file name associated to this resource.
Gets the virtual filename for this resource.
getCacheTime
long getCacheTime()
- Returns:
- Cache time in milliseconds
Gets 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. Default is DEFAULT_CACHETIME
.
getBufferSize
int getBufferSize()
- Returns:
- int the size of the buffer in bytes.
Gets the size of the download buffer used for this resource.
If the buffer size is 0, the buffer size is decided by the terminal adapter. The default value is 0.