org.millstone.base.terminal
Interface ApplicationResource

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

public interface ApplicationResource
extends Resource

This interface must be implemented by classes wishing to provide Application resources. Application resources 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:
3.0.3
Author:
IT Mill Ltd.

Field Summary
static long DEFAULT_CACHETIME
          Default cache time.
 
Method Summary
 Application getApplication()
          Get the application of the resource
 int getBufferSize()
          Get the size of the download buffer used for this resource.
 long getCacheTime()
          Get lenght of cache expiracy time.
 java.lang.String getFilename()
          Get virtual filename for the resource
 DownloadStream getStream()
          Get resource as stream
 
Methods inherited from interface org.millstone.base.terminal.Resource
getMIMEType
 

Field Detail

DEFAULT_CACHETIME

public static final long DEFAULT_CACHETIME
Default cache time.

See Also:
Constant Field Values
Method Detail

getStream

public DownloadStream getStream()
Get resource as stream


getApplication

public Application getApplication()
Get the application of the resource


getFilename

public java.lang.String getFilename()
Get virtual filename for the resource


getCacheTime

public long getCacheTime()
Get lenght of cache expiracy 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

public int getBufferSize()
Get 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,2001,2002 IT Mill Ltd. All Rights Reserved.