Class ElytronPolicyConfigurationFactory


  • public class ElytronPolicyConfigurationFactory
    extends javax.security.jacc.PolicyConfigurationFactory

    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.

    Author:
    Pedro Igor
    See Also:
    JaccDelegatingPolicy
    • Constructor Detail

      • ElytronPolicyConfigurationFactory

        public ElytronPolicyConfigurationFactory()
    • Method Detail

      • getCurrentPolicyConfiguration

        static <P extends javax.security.jacc.PolicyConfiguration> P getCurrentPolicyConfiguration()
                                                                                            throws javax.security.jacc.PolicyContextException

        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.

        Returns:
        this method always returns a configuration instance transitioned with the in service state and associated with the current policy context identifier.
        Throws:
        javax.security.jacc.PolicyContextException - 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 javax.security.jacc.PolicyConfiguration getPolicyConfiguration​(String contextID,
                                                                              boolean remove)
                                                                       throws javax.security.jacc.PolicyContextException
        Specified by:
        getPolicyConfiguration in class javax.security.jacc.PolicyConfigurationFactory
        Throws:
        javax.security.jacc.PolicyContextException
      • inService

        public boolean inService​(String contextID)
                          throws javax.security.jacc.PolicyContextException
        Specified by:
        inService in class javax.security.jacc.PolicyConfigurationFactory
        Throws:
        javax.security.jacc.PolicyContextException