| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MediaRequest
API for media requests.
This API represents a request for a specific media item. In some ways it is 
 similar to the java ServletRequest API. When a user 
 wants to view a particular media item, the application will create an instance
 of this class and populate it with values so that getMediaItemId(),
 getQuality(), and getSize() are set according to what the 
 user requested. It might also populate a list of MediaEffect objects
 that the user requested to be applied to the media item.
The implementation of this API should be coded to return a unique key 
 from the getCacheKey() method, based on the properties set in 
 the object (i.e. the size, quality, etc.). This is so the application can 
 cache the results of processing this request so that future requests for the 
 same item with the same properties do not need to be re-processed.
| Field Summary | |
|---|---|
| static java.lang.String | OUTPUT_FILE_KEYThe parameter key for a File object the OutputStream in MediaResponse is pointed at. | 
| static java.lang.String | USER_AGENT_KEYThe user agent making this request. | 
| Method Summary | |
|---|---|
|  java.lang.String | getCacheKey()Get a key that can uniquely define this media request, for purposes of using as a key for caching. | 
|  java.util.List<MediaEffect> | getEffects()Get a List of effects to apply to the request. | 
|  java.lang.Long | getMediaItemId()Get the ID of the media item desired. | 
|  java.util.Map<java.lang.String,java.lang.Object> | getParameters()Get a Map of optional additional parameters. | 
|  MediaQuality | getQuality()Get the desired quality constant. | 
|  MediaSize | getSize()Get the desired size constant. | 
|  boolean | isOriginal()Return true if the original media item file is desired. | 
| Field Detail | 
|---|
static final java.lang.String OUTPUT_FILE_KEY
static final java.lang.String USER_AGENT_KEY
| Method Detail | 
|---|
java.lang.Long getMediaItemId()
boolean isOriginal()
MediaSize getSize()
MediaQuality getQuality()
java.util.Map<java.lang.String,java.lang.Object> getParameters()
During request handling, MediaHandler implementations are 
 allowed to add parameters to this map.
java.util.List<MediaEffect> getEffects()
The effects should be applied in the order of the list. The 
 MediaHandler servicing the request should be allowed to 
 make changes to this List as it sees fit.
java.lang.String getCacheKey()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||