Class CookieExpiration


  • public final class CookieExpiration
    extends Object
    The configuration settings of the session cookie's expiration.
    • Constructor Detail

      • CookieExpiration

        public CookieExpiration()
    • Method Detail

      • convention

        public CookieExpirationConvention convention()
        Get the convention property: The convention used when determining the session cookie's expiration.
        Returns:
        the convention value.
      • withConvention

        public CookieExpiration withConvention​(CookieExpirationConvention convention)
        Set the convention property: The convention used when determining the session cookie's expiration.
        Parameters:
        convention - the convention value to set.
        Returns:
        the CookieExpiration object itself.
      • timeToExpiration

        public String timeToExpiration()
        Get the timeToExpiration property: The time after the request is made when the session cookie should expire.
        Returns:
        the timeToExpiration value.
      • withTimeToExpiration

        public CookieExpiration withTimeToExpiration​(String timeToExpiration)
        Set the timeToExpiration property: The time after the request is made when the session cookie should expire.
        Parameters:
        timeToExpiration - the timeToExpiration value to set.
        Returns:
        the CookieExpiration object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.