Class JerseyLink


  • public final class JerseyLink
    extends Link
    Jersey implementation of JAX-RS Link contract.
    Author:
    Marek Potociar
    • Method Detail

      • getUri

        public URI getUri()
        Description copied from class: Link
        Returns the underlying URI associated with this link.
        Specified by:
        getUri in class Link
        Returns:
        underlying URI.
      • getUriBuilder

        public UriBuilder getUriBuilder()
        Description copied from class: Link
        Convenience method that returns a UriBuilder initialized with this link's underlying URI.
        Specified by:
        getUriBuilder in class Link
        Returns:
        UriBuilder initialized using underlying URI.
      • getRel

        public String getRel()
        Description copied from class: Link
        Returns the value associated with the link rel param, or null if this param is not specified.
        Specified by:
        getRel in class Link
        Returns:
        relation types as string or null.
      • getRels

        public List<String> getRels()
        Description copied from class: Link
        Returns the value associated with the link rel param as a list of strings or the empty list if rel is not defined.
        Specified by:
        getRels in class Link
        Returns:
        relation types as list of strings or empty list.
      • getTitle

        public String getTitle()
        Description copied from class: Link
        Returns the value associated with the link title param, or null if this param is not specified.
        Specified by:
        getTitle in class Link
        Returns:
        value of title parameter or null.
      • getType

        public String getType()
        Description copied from class: Link
        Returns the value associated with the link type param, or null if this param is not specified.
        Specified by:
        getType in class Link
        Returns:
        value of type parameter or null.
      • getParams

        public Map<String,​String> getParams()
        Description copied from class: Link
        Returns an immutable map that includes all the link parameters defined on this link. If defined, this map will include entries for rel, title and type.
        Specified by:
        getParams in class Link
        Returns:
        immutable map of link parameters.
      • toString

        public String toString()
        Description copied from class: Link
        Returns a string representation as a link header (RFC 5988). All link params are serialized as link-param="value" where value is a quoted-string. For example, <http://foo.bar/employee/john>; title="employee"; rel="manager friend"
        Specified by:
        toString in class Link
        Returns:
        string link header representation for this link.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object