com.vaadin.terminal
Interface ApplicationResource

All Superinterfaces:
Resource, Serializable
All Known Implementing Classes:
ClassResource, FileResource, StreamResource

public interface ApplicationResource
extends Resource, Serializable

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:
7.0.0.alpha3
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
Default cache time.

See Also:
Constant Field Values
Method Detail

getStream

DownloadStream getStream()
Gets resource as stream.


getApplication

Application getApplication()
Gets the application of the resource.


getFilename

String getFilename()
Gets the virtual filename for this resource.

Returns:
the file name associated to this resource.

getCacheTime

long getCacheTime()
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.

Returns:
Cache time in milliseconds

getBufferSize

int getBufferSize()
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.

Returns:
int the size of the buffer in bytes.


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.