Class EsiContentResolver


  • public class EsiContentResolver
    extends java.lang.Object
    Content resolver for esi-includes fetching the content of an include's source url.

    The content of the url of the src-attribute is fetched and inserted into the page flow, just as a esi-include processor like e.g.varnish would do.

    If the onerror-attribute is set to continue, any errors that occur while fetching the document are ignored.
    Otherwise an error message is output into the pageflow.

    • Constructor Summary

      Constructors 
      Constructor Description
      EsiContentResolver​(Fetch fetch, java.lang.String prefixForRelativePath)  
    • Method Summary

      Modifier and Type Method Description
      java.lang.String fetch​(java.lang.String src, java.lang.String templateName, boolean continueOnError)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EsiContentResolver

        public EsiContentResolver​(Fetch fetch,
                                  java.lang.String prefixForRelativePath)
        Parameters:
        fetch - a Function that takes the url to be fetched and returns a response object with its content and status
        prefixForRelativePath - optional, may be null. Protocol and hostname to prefix a relative url in the src-attribute. E.g. "http://www.otto.de"
    • Method Detail

      • fetch

        public java.lang.String fetch​(java.lang.String src,
                                      java.lang.String templateName,
                                      boolean continueOnError)