Basically encapsulate the common methods in Response and
ContainerResponseContext into one interface, class, or abstract class:
public class LinkHeaders
{
public Set<Link> getLinks()
public boolean hasLink(String relation)
public Link getLink(String relation)
public Link.Builder getLinkBuilder(String relation)
public toString();
public static void valueOf(String val)
}
Modify Response and ContainerResponse to remove the above methods and
just have a getLinkHeaders() method. Finally, make LinkHeaders
injectable via @Context (which is the main reason I want the separate
class).
http://java.net/jira/browse/JAX_RS_SPEC-225
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com