Class ElytronPolicyConfigurationFactory

  • public class ElytronPolicyConfigurationFactory

    A PolicyConfigurationFactory implementation.

    Accordingly with the JACC specification, a PolicyConfigurationFactory is a singleton, instantiate once during the application server startup. Thus, there is only one instance of this class for a given JRE of an application server.

    The static method getCurrentPolicyConfiguration() is necessary in order to keep compatibility with TCK, given that it will wrap both factory and policy provider into its own implementations and still should be possible to obtain the policy configuration created by this factory by the JaccDelegatingPolicy. This behavior is exactly the same as currently being used by RI implementation from GF and PicketBox.

    Pedro Igor
    See Also:
    • Constructor Detail

      • ElytronPolicyConfigurationFactory

        public ElytronPolicyConfigurationFactory()
    • Method Detail

      • getCurrentPolicyConfiguration

        static <P extends> P getCurrentPolicyConfiguration()

        Returns the PolicyConfiguration associated with the current policy context identifier.

        This method only returns PolicyConfiguration transitioned to the in service state. If the configuration associated with the current policy context identifier is in a different state, a exception is thrown.

        this method always returns a configuration instance transitioned with the in service state and associated with the current policy context identifier.
        Throws: - if the configuration is in a different state than in service, no policy context identifier was set or if no configuration is found for the given identifier.
      • getPolicyConfiguration

        public getPolicyConfiguration​(String contextID,
                                                                              boolean remove)
        Specified by:
        getPolicyConfiguration in class
      • inService

        public boolean inService​(String contextID)
        Specified by:
        inService in class