|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MediaHandlerDelegate
API for delegate media requests.
This API is for chaining one media request to another, eg. for processing embedded media within one media type. For example an MP3 handler might want to delegate to a JPEG handler for an embedded album cover image.
This allows a normal MediaHandler
implementation to also serve as a delegate for another implementation.
Thus a single JPEG implementation of MediaHandler
might also implement this API so it can be used as a delegate, and
the JPEG processing code can be implemented once and shared by both
request processing functions.
Method Summary | |
---|---|
java.lang.String |
getDelegateFileExtension(org.springframework.core.io.Resource mediaResource,
java.lang.String mimeType,
MediaItem item,
MediaRequest request)
Get the preferred file extension for this handler. |
void |
handleDelegateMediaRequest(org.springframework.core.io.Resource mediaResource,
java.lang.String mimeType,
MediaItem item,
MediaRequest request,
MediaResponse response)
Handle a delegate media request. |
Method Detail |
---|
void handleDelegateMediaRequest(org.springframework.core.io.Resource mediaResource, java.lang.String mimeType, MediaItem item, MediaRequest request, MediaResponse response)
The mediaResource
is not the original MediaItem
resource, rather it is the media resource extracted from
the MediaItem, e.g. the metadata resource.
mediaResource
- the media data to processmimeType
- the MIME type of the media data in mediaResource
item
- the MediaItem being processedrequest
- the requestresponse
- the responsejava.lang.String getDelegateFileExtension(org.springframework.core.io.Resource mediaResource, java.lang.String mimeType, MediaItem item, MediaRequest request)
The mediaResource
is not the original MediaItem
resource, rather it is the media resource extracted from
the MediaItem, e.g. the metadata resource.
Some handlers might return a different file extension for a given request then the default file extension for their type (for example a PNG image handler that returns JPEG images when resizing the images.
mediaResource
- the media data to processmimeType
- the MIME type of the media data in mediaResource
item
- the MediaItem being processedrequest
- the request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |