Class FeedPageHeader

  • All Implemented Interfaces:
    ToHttpHeaders

    public final class FeedPageHeader
    extends java.lang.Object
    implements ToHttpHeaders
    This class represents the headers of a snapshot page.
    • Constructor Summary

      Constructors 
      Constructor Description
      FeedPageHeader​(@NonNull java.time.Instant lastModified, Link.Self self, @NonNull java.util.Optional<@NonNull Link.Prev> prev, @NonNull java.util.Optional<@NonNull Link.Next> next)  
      FeedPageHeader​(@NonNull java.time.Instant lastModified, Link.Self self, @NonNull java.util.Optional<@NonNull Link.Prev> prev, @NonNull java.util.Optional<@NonNull Link.Next> next, @NonNull HttpHeaders extraHeaders)
      Creates a new FeedPageHeader instance.
    • Constructor Detail

      • FeedPageHeader

        public FeedPageHeader​(@NonNull
                              @NonNull java.time.Instant lastModified,
                              @NonNull
                              Link.Self self,
                              @NonNull
                              @NonNull java.util.Optional<@NonNull Link.Prev> prev,
                              @NonNull
                              @NonNull java.util.Optional<@NonNull Link.Next> next)
      • FeedPageHeader

        public FeedPageHeader​(@NonNull
                              @NonNull java.time.Instant lastModified,
                              @NonNull
                              Link.Self self,
                              @NonNull
                              @NonNull java.util.Optional<@NonNull Link.Prev> prev,
                              @NonNull
                              @NonNull java.util.Optional<@NonNull Link.Next> next,
                              @NonNull
                              @NonNull HttpHeaders extraHeaders)
        Creates a new FeedPageHeader instance.
        Parameters:
        lastModified - The page's timestamp. This is equal to the timestamp of the page's final entity.
        self - The stable URL of this page itself. This URL must always resolve to this page, even as new entities are added to the feed.
        prev - The URL of the immediately previous (i.e. older) feed page. If this header is missing then there are no older pages and this page marks the start of the feed.
        next - The URL of the immediately next (i.e. newer) feed page. If this header is missing then there are no newer pages and this is currently the latest page of the feed.
        extraHeaders - Additional unstructured headers.
    • Method Detail

      • toHttpHeaders

        @NonNull
        public @NonNull HttpHeaders toHttpHeaders()
        Description copied from interface: ToHttpHeaders
        Return HTTP headers for this object.
        Specified by:
        toHttpHeaders in interface ToHttpHeaders
        Returns:
        HTTP headers associated with this object
      • lastModified

        @NonNull
        public @NonNull java.time.Instant lastModified()
        The page's timestamp. This is equal to the timestamp of the page's final entity.
      • self

        @NonNull
        public Link.Self self()
        The stable URL of this page itself. This URL must always resolve to this page, even as new entities are added to the feed.
      • prev

        @NonNull
        public @NonNull java.util.Optional<@NonNull Link.Prev> prev()
        The URL of the immediately previous (i.e. older) feed page. If this header is missing then there are no older pages and this page marks the start of the feed.
      • next

        @NonNull
        public @NonNull java.util.Optional<@NonNull Link.Next> next()
        The URL of the immediately next (i.e. newer) feed page. If this header is missing then there are no newer pages and this is currently the latest page of the feed.
      • extraHeaders

        @NonNull
        public @NonNull HttpHeaders extraHeaders()
        Additional unstructured headers.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object