com.sun.ws.rest.api.response
Class TemporaryRedirect

java.lang.Object
  extended by com.sun.ws.rest.api.response.HttpResponse
      extended by com.sun.ws.rest.api.response.TemporaryRedirect

public class TemporaryRedirect
extends HttpResponse

An abstraction for a HTTP response to temporarily redirect a client to a new URI.


Constructor Summary
TemporaryRedirect()
          Creates a new instance of TemporaryRedirect
TemporaryRedirect(java.net.URI location)
          Creates a new instance of TemporaryRedirect
 
Method Summary
 void addResponseHeaders(HttpContext context)
          Add the HTTP headers for this type of response to the response context.
 java.net.URI getLocation()
          Get the location where clients wil be redirected.
 void setLocation(java.net.URI location)
          Set the location where clients wil be redirected.
 
Methods inherited from class com.sun.ws.rest.api.response.HttpResponse
getCacheControl, getCacheControl, getRepresentation, getStatus, setRepresentation, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporaryRedirect

public TemporaryRedirect()
Creates a new instance of TemporaryRedirect


TemporaryRedirect

public TemporaryRedirect(java.net.URI location)
Creates a new instance of TemporaryRedirect

Parameters:
location - the location where clients wil be redirected. Relative URIs are allowed, the runtime will resolve such URIs against the URI of the resource whose method returned the representation.
Method Detail

setLocation

public void setLocation(java.net.URI location)
Set the location where clients wil be redirected.

Parameters:
location - the location where clients wil be redirected. Relative URIs are allowed, the runtime will resolve such URIs against the URI of the resource whose method returned the representation.

getLocation

public java.net.URI getLocation()
Get the location where clients wil be redirected. Relative URIs are allowed, the runtime will resolve such URIs against the URI of the resource whose method returned the representation.

Returns:
the URI of the newly created resource

addResponseHeaders

public void addResponseHeaders(HttpContext context)
Add the HTTP headers for this type of response to the response context.

Overrides:
addResponseHeaders in class HttpResponse
Parameters:
context - the current HTTP context