|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.millstone.base.terminal.StreamResource
Stream resource is a resource provided to the client directly by the application. The strean resource is fetched from URI that is most often in the context of the application or window. The resource is automatically registered to window in creation.
Nested Class Summary | |
static interface |
StreamResource.StreamSource
Interface implemented by the source of a StreamResource. |
Field Summary |
Fields inherited from interface org.millstone.base.terminal.ApplicationResource |
DEFAULT_CACHETIME |
Constructor Summary | |
StreamResource(StreamResource.StreamSource streamSource,
java.lang.String filename,
Application application)
Create new stream resource for downloading from stream. |
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()
Returns the filename. |
java.lang.String |
getMIMEType()
Get the MIME type of the resource. |
DownloadStream |
getStream()
Get resource as stream |
StreamResource.StreamSource |
getStreamSource()
Returns the source for this StreamResource. |
void |
setBufferSize(int bufferSize)
Set the size of the download buffer used for this resource. |
void |
setCacheTime(long cacheTime)
Set lenght of cache expiracy time. |
void |
setFilename(java.lang.String filename)
Sets the filename. |
void |
setMIMEType(java.lang.String MIMEType)
Set the mime type of the resource |
void |
setStreamSource(StreamResource.StreamSource streamSource)
Sets the source for this StreamResource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StreamResource(StreamResource.StreamSource streamSource, java.lang.String filename, Application application)
Method Detail |
public java.lang.String getMIMEType()
Resource
getMIMEType
in interface Resource
public void setMIMEType(java.lang.String MIMEType)
public StreamResource.StreamSource getStreamSource()
public void setStreamSource(StreamResource.StreamSource streamSource)
streamSource
- The source to setpublic java.lang.String getFilename()
getFilename
in interface ApplicationResource
public void setFilename(java.lang.String filename)
filename
- The filename to setpublic Application getApplication()
ApplicationResource
getApplication
in interface ApplicationResource
ApplicationResource.getApplication()
public DownloadStream getStream()
ApplicationResource
getStream
in interface ApplicationResource
ApplicationResource.getStream()
public int getBufferSize()
ApplicationResource
If the buffer size is 0, the buffer size is decided by the terminal adapter. The default value is 0.
getBufferSize
in interface ApplicationResource
public void setBufferSize(int bufferSize)
bufferSize
- The size of the buffer in bytes.public long getCacheTime()
ApplicationResource
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.
getCacheTime
in interface ApplicationResource
public void setCacheTime(long cacheTime)
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 negavive value disbales the caching of this stream.
cacheTime
- The cache time in milliseconds.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |