Interface HttpContextFactory

All Known Implementing Classes:
SecurityContextFactory

public interface HttpContextFactory
A factory which is responsible for creating new request Contexts for each JSON request. The returned context must include a RootContext as its root and may include zero or more sub-contexts.

As an example, a context factory may return a context chain which includes authentication state information.

  • Method Summary

    Modifier and Type
    Method
    Description
    org.forgerock.services.context.Context
    createContext(org.forgerock.services.context.Context parent, org.forgerock.http.protocol.Request request)
    Returns the context which should be used for the provided HTTP request.
  • Method Details

    • createContext

      org.forgerock.services.context.Context createContext(org.forgerock.services.context.Context parent, org.forgerock.http.protocol.Request request) throws ResourceException
      Returns the context which should be used for the provided HTTP request.
      Parameters:
      parent - The parent context.
      request - The HTTP request which is about to be processed.
      Returns:
      The context which should be used for the provided HTTP request.
      Throws:
      ResourceException - If a request context could not be obtained.