Interface ImageRequestHandler.Callback
- Enclosing class:
ImageRequestHandler
ImageRequestHandler.handle(Response).-
Method Summary
Modifier and TypeMethodDescriptionbooleanPerforms authorization using anAuthorizer.booleanPerforms pre-authorization using anAuthorizer.voidinfoAvailable(Info info) Called when image information is available; always beforewillProcessImage(Info)andwillStreamImageFromVariantCache(StatResult).voidsourceAccessed(StatResult result) Called immediately after the source image has first been accessed in the request cycle.voidwillProcessImage(Info info) All setup is complete and processing will begin very soon after this method returns.voidCalled when a hit is found in the variant cache.
-
Method Details
-
authorizeBeforeAccess
Performs pre-authorization using an
Authorizer.willProcessImage(Info)has not yet been called.- Returns:
- Authorization result.
- Throws:
Exception
-
authorize
Performs authorization using an
Authorizer.willProcessImage(Info)has not yet been called.- Returns:
- Authorization result.
- Throws:
Exception
-
sourceAccessed
Called immediately after the source image has first been accessed in the request cycle. (In the case of cached variant images, when
Key.CACHE_SERVER_RESOLVE_FIRSTis set tofalse, it may never be—in that case, seewillStreamImageFromVariantCache(StatResult).)- Parameters:
result- Information about the source or cached variant image.
-
infoAvailable
Called when image information is available; always beforewillProcessImage(Info)andwillStreamImageFromVariantCache(StatResult).The
operatlon listcan still be modified at this point.- Parameters:
info- Efficiently obtained instance.- Throws:
Exception
-
willStreamImageFromVariantCache
Called when a hit is found in the variant cache. In this case, no further processing will be necessary and the streaming will begin very soon after this method returns.
If a hit is not found in the variant cache, this method is not called.
This method tends to be called relatively early. No other callback methods will be called after this one.
- Throws:
Exception
-
willProcessImage
All setup is complete and processing will begin very soon after this method returns.
The
operatlon listcannot be modified.This method tends to be called last.
- Parameters:
info- Efficiently obtained instance.- Throws:
Exception
-