Interface RemoteContentRendererRequestHandler


  • public interface RemoteContentRendererRequestHandler
    Interface for OSGi service implementations capable of processing requests sent to a remote content rendering endpoint
    • Method Detail

      • canHandle

        boolean canHandle​(@Nonnull
                          SlingHttpServletRequest servletRequest)
        Should the current RemoteContentRendererRequestHandler implementation be used to process the request
        Parameters:
        servletRequest - The AEM internal servlet request
        Returns:
        true if the Handler can process the request
      • getRequestConfig

        @Nullable
        RequestConfig getRequestConfig​(@Nonnull
                                       SlingHttpServletRequest servletRequest)
        Returns the configuration that will be used to execute the remote request
        Parameters:
        servletRequest - The AEM internal servlet request
        Returns:
        The RequestConfig configuration object
      • getResponseMessage

        @Nonnull
        java.lang.String getResponseMessage​(@Nonnull
                                            CloseableHttpResponse httpResponse)
                                     throws java.io.IOException
        Returns the potentially processed response from the remote content rendering endpoint
        Parameters:
        httpResponse - Response to the request sent to the remote endpoint
        Returns:
        The processed response text to be injected in servlets SlingHttpServletResponse
        Throws:
        java.io.IOException - exception when reading from the CloseableHttpResponse
      • getSlingModelAdapterClasses

        @Nonnull
        default java.lang.Class<? extends ComponentExporter>[] getSlingModelAdapterClasses()
        Returns the list of classes that the Sling Model Exporter should try to adapt the request to
        Returns:
        The list of classes