View Javadoc

1   package com.atlassian.cache.servlet.resolver;
2   
3   import javax.servlet.ServletConfig;
4   import javax.servlet.ServletException;
5   import javax.servlet.http.HttpServletRequest;
6   import javax.servlet.http.HttpServletResponse;
7   import java.io.IOException;
8   
9   /**
10   * Defines a interface which allows a class to resolve content that should be included in the CombinedCachingServlet.
11   */
12  public interface ContentResolver
13  {
14      /**
15       * This method will utilize whatever strategey the implementor requires to attain the requested content.
16       * @param path is the path to the requested content
17       * @param request an HttpServletRequest
18       * @param response an HttpServletResonse
19       * @return a string representing the content requested
20       */
21      public String getContent(String path, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException;
22  
23      public void init(ServletConfig servletConfig) throws ServletException;
24  }