Interface ImageRequestHandler.Callback
- Enclosing class:
ImageRequestHandler
ImageRequestHandler.handle(Response)
.-
Method Summary
Modifier and TypeMethodDescriptionboolean
Performs authorization using anAuthorizer
.boolean
Performs pre-authorization using anAuthorizer
.void
infoAvailable
(Info info) Called when image information is available; always beforewillProcessImage(Info)
andwillStreamImageFromVariantCache(StatResult)
.void
sourceAccessed
(StatResult result) Called immediately after the source image has first been accessed in the request cycle.void
willProcessImage
(Info info) All setup is complete and processing will begin very soon after this method returns.void
Called 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_FIRST
is 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 list
can 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 list
cannot be modified.This method tends to be called last.
- Parameters:
info
- Efficiently obtained instance.- Throws:
Exception
-