Interface InformationRequestHandler.Callback
- Enclosing class:
InformationRequestHandler
public static interface InformationRequestHandler.Callback
Callback for various events that occur during a call to InformationRequestHandler.handle().
Any exceptions thrown from these methods will bubble up through
InformationRequestHandler.handle(). This feature can be used to support e.g. a ResourceException with a custom status depending on the authorization
result.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanPerforms authorization using anAuthorizerafter the image has been accessed, so information about it is available.booleanPerforms authorization using anAuthorizer.voidcacheAccessed(StatResult result) Called immediately after a cached instance has been accessed.voidsourceAccessed(StatResult result) Called immediately after a source image has been accessed.
-
Method Details
-
authorizeBeforeAccess
Performs authorization using an
Authorizer. The source image has not been accessed yet, so no information about it is available.This is the first callback to get called.
- Returns:
- Authorization result.
- Throws:
Exception
-
authorize
Performs authorization using an
Authorizerafter the image has been accessed, so information about it is available.- Returns:
- Authorization result.
- Throws:
Exception
-
sourceAccessed
Called immediately after a source image has been accessed. (In the case of cached instances, whenKey.CACHE_SERVER_RESOLVE_FIRSTis set tofalse, it may never be—in that case, seecacheAccessed(StatResult).)- Parameters:
result- Information about the source image.
-
cacheAccessed
Called immediately after a cached instance has been accessed.- Parameters:
result- Information about the cached instance.
-