Class FreeMarkerRequestHandler

java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jgrapes.http.freemarker.FreeMarkerRequestHandler
All Implemented Interfaces:
Iterable<ComponentType>, Channel, ComponentType, Eligible, Manager

public class FreeMarkerRequestHandler extends Component
A base class for components that generate responses to HTTP requests which are based on a FreeMarker template.
  • Field Details

  • Constructor Details

    • FreeMarkerRequestHandler

      public FreeMarkerRequestHandler(Channel componentChannel, HandlerDefinition.ChannelReplacements channelReplacements, ClassLoader contentLoader, String contentPath, URI prefix)
      Instantiates a new free marker request handler.

      The prefix path is removed from the request paths before resolving them against the content root. A prefix path must start with a slash and must end with a slash. If the request handler should respond to top-level requests, the prefix must be a single slash.

      Parameters:
      componentChannel - the component channel
      channelReplacements - the channel replacements to apply to the channels elements of the Handler annotations
      contentLoader - the content loader
      contentPath - the content path
      prefix - the prefix used in requests
    • FreeMarkerRequestHandler

      public FreeMarkerRequestHandler(Channel componentChannel, ClassLoader contentLoader, String contentPath, URI prefix)
      Instantiates a new free marker request handler.

      The prefix path is removed from the request paths before resolving them against the content root. A prefix path must start with a slash and must end with a slash. If the request handler should respond to top-level requests, the prefix must be a single slash.

      Parameters:
      componentChannel - the component channel
      contentLoader - the content loader
      contentPath - the content path
      prefix - the prefix used in requests
  • Method Details