public static PrimeRequestContext getCurrentInstance(FacesContext facesContext) {
        if (facesContext == null) {
            return null;
        }

        PrimeRequestContext context = (PrimeRequestContext) facesContext.getAttributes().get(INSTANCE_KEY);

        if (context == null) {
            context = new PrimeRequestContext(facesContext);
            setCurrentInstance(context, facesContext);
        }

        return context;
    }
A {@link PrimeRequestContext} is a contextual store for the current request.

It can be accessed via:
<blockquote>
PrimeRequestContext.getCurrentInstance(context)
</blockquote>
primefaces/src/main/java/org/primefaces/context/PrimeRequestContext.java