org.glassfish.jersey.message.internal
Class JerseyLink

java.lang.Object
  extended by javax.ws.rs.core.Link
      extended by org.glassfish.jersey.message.internal.JerseyLink

public final class JerseyLink
extends Link

Jersey implementation of JAX-RS Link contract.

Author:
Marek Potociar (marek.potociar at oracle.com)

Nested Class Summary
static class JerseyLink.Builder
          Jersey implementation of JAX-RS Link.Builder contract.
 
Nested classes/interfaces inherited from class javax.ws.rs.core.Link
Link.JaxbAdapter, Link.JaxbLink
 
Field Summary
 
Fields inherited from class javax.ws.rs.core.Link
REL, TITLE, TYPE
 
Method Summary
 boolean equals(Object other)
           
 Map<String,String> getParams()
          Returns an immutable map that includes all the link parameters defined on this link.
 String getRel()
          Returns the value associated with the link rel param, or null if this param is not specified.
 List<String> getRels()
          Returns the value associated with the link rel param as a list of strings or the empty list if rel is not defined.
 String getTitle()
          Returns the value associated with the link title param, or null if this param is not specified.
 String getType()
          Returns the value associated with the link type param, or null if this param is not specified.
 URI getUri()
          Returns the underlying URI associated with this link.
 UriBuilder getUriBuilder()
          Convenience method that returns a UriBuilder initialized with this link's underlying URI.
 int hashCode()
           
 String toString()
          Returns a string representation as a link header (RFC 5988).
 
Methods inherited from class javax.ws.rs.core.Link
fromLink, fromMethod, fromPath, fromResource, fromUri, fromUri, fromUriBuilder, valueOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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, ; title="employee"; rel="manager friend"

Specified by:
toString in class Link
Returns:
string link header representation for this link.

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.