Class CompositeCookieDecoder

java.lang.Object
io.micronaut.http.client.jdk.cookie.CompositeCookieDecoder
All Implemented Interfaces:
io.micronaut.core.order.Ordered, CookieDecoder

@Primary @Singleton @Internal public class CompositeCookieDecoder extends Object implements CookieDecoder
Iterate the cookieDecoders and return the first one that returns cookies.
Since:
4.0.0
  • Field Summary

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<io.micronaut.http.cookie.Cookies>
    decode(io.micronaut.http.HttpRequest<?> request)
    Decode the cookies from the request.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Constructor Details

    • CompositeCookieDecoder

      @Inject public CompositeCookieDecoder(List<CookieDecoder> cookieDecoders)
  • Method Details

    • decode

      public Optional<io.micronaut.http.cookie.Cookies> decode(io.micronaut.http.HttpRequest<?> request)
      Description copied from interface: CookieDecoder
      Decode the cookies from the request.
      Specified by:
      decode in interface CookieDecoder
      Parameters:
      request - the request
      Returns:
      the cookies or empty if none