Interface ImageRequestHandler.Callback

Enclosing class:
ImageRequestHandler

public static interface ImageRequestHandler.Callback
Callback for various events that occur during a call to ImageRequestHandler.handle(Response).
  • Method Details

    • authorizeBeforeAccess

      boolean authorizeBeforeAccess() throws Exception

      Performs pre-authorization using an Authorizer.

      willProcessImage(Info) has not yet been called.

      Returns:
      Authorization result.
      Throws:
      Exception
    • authorize

      boolean authorize() throws Exception

      Performs authorization using an Authorizer.

      willProcessImage(Info) has not yet been called.

      Returns:
      Authorization result.
      Throws:
      Exception
    • sourceAccessed

      void sourceAccessed(StatResult result)

      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 to false, it may never be—in that case, see willStreamImageFromVariantCache(StatResult).)

      Parameters:
      result - Information about the source or cached variant image.
    • infoAvailable

      void infoAvailable(Info info) throws Exception
      Called when image information is available; always before willProcessImage(Info) and willStreamImageFromVariantCache(StatResult).

      The operatlon list can still be modified at this point.

      Parameters:
      info - Efficiently obtained instance.
      Throws:
      Exception
    • willStreamImageFromVariantCache

      void willStreamImageFromVariantCache(StatResult result) throws Exception

      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

      void willProcessImage(Info info) throws Exception

      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