org.apache.myfaces.trinidad.context

## Class RequestContextFactory

- java.lang.Object
- - org.apache.myfaces.trinidad.context.RequestContextFactory

-     public abstract class RequestContextFactory
      extends Object

  Factory for creating RequestContext objects.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestContextFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract RequestContext` | `createContext(javax.faces.context.ExternalContext ec)` Creates a RequestContext from an ExternalContext.
    `abstract RequestContext` | `createContext(Object context, Object request)` Deprecated. This method does not work in a Portal environment. It will only work with a ServletRequest. Please use `createContext(ExternalContext)` which is container agnostic.
    `static RequestContextFactory` | `getFactory()` Retrieve the current RequestContextFactory.
    `static void` | `setFactory(RequestContextFactory factory)` Store the current RequestContextFactory.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RequestContextFactory

          public RequestContextFactory()

  - ### Method Detail

    - #### getFactory

          public static RequestContextFactory getFactory()

      Retrieve the current RequestContextFactory.

    - #### setFactory

          public static void setFactory(RequestContextFactory factory)

      Store the current RequestContextFactory.

    - #### createContext

          @Deprecated
          public abstract RequestContext createContext(Object context,
                                                Object request)

      Deprecated. This method does not work in a Portal environment. It will only work with a ServletRequest. Please use `createContext(ExternalContext)` which is container agnostic.
      Create a RequestContext from a ServletContext and ServletRequest.
      Parameters:
        `context` - an object which must be a ServletContext
        `request` - an object which must be a ServletRequest

    - #### createContext

          public abstract RequestContext createContext(javax.faces.context.ExternalContext ec)

      Creates a RequestContext from an ExternalContext. This ExternalContext does NOT need to have a bound response object, only the Context and the Request are guarenteed.
      Parameters:
        `ec` - The current ExternalContext.

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.