org.glassfish.jersey.examples.shortener.webapp.resource
Class ResolverResource

java.lang.Object
  extended by org.glassfish.jersey.examples.shortener.webapp.resource.ResolverResource

@Path(value="r")
public class ResolverResource
extends Object

Resource resolving shortened link and relocating (HTTP 301) a client to the original link. Client is shown error-404 page if the provided link is not valid (see ErrorTemplate and ValidShortenedLink).

Author:
Michal Gajdos (michal.gajdos at oracle.com)

Constructor Summary
ResolverResource()
           
 
Method Summary
 javax.ws.rs.core.Response resolveLink(String link)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResolverResource

public ResolverResource()
Method Detail

resolveLink

@GET
@Path(value="{link}")
@ErrorTemplate(name="/error-404")
public javax.ws.rs.core.Response resolveLink(@PathParam(value="link")
                                                                    String link)


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