org.apache.cocoon.rest.jaxrs.response
Class URLResponseBuilder

java.lang.Object
  extended by javax.ws.rs.core.Response.ResponseBuilder
      extended by org.apache.cocoon.rest.jaxrs.response.URLResponseBuilder

public abstract class URLResponseBuilder
extends javax.ws.rs.core.Response.ResponseBuilder

A class to get a Response.ResponseBuilder that has all information set correctly that is provided by a URLConnection. It must be used when the JAX-RS container runs within the Cocoon Servlet-Service framework.

See Also:
CocoonJAXRSServlet

Constructor Summary
URLResponseBuilder()
           
 
Method Summary
static javax.ws.rs.core.Response.ResponseBuilder newInstance(String url)
          The same as newInstance(URL) but the URL is passed as String.
static javax.ws.rs.core.Response.ResponseBuilder newInstance(String url, Map<String,Object> data)
          The same as newInstance(URL, Map) but the URL is passed as String.
static javax.ws.rs.core.Response.ResponseBuilder newInstance(URL url)
          The same as newInstance(URL, Map) but no objects are passed to the URL.
static javax.ws.rs.core.Response.ResponseBuilder newInstance(URL url, Map<String,Object> data)
          Create a Response.ResponseBuilder that retrieves all available information (header parameters, Last-Modified, Content-Type) from the URLConnection opened on the passed URL.
 
Methods inherited from class javax.ws.rs.core.Response.ResponseBuilder
build, cacheControl, clone, contentLocation, cookie, entity, expires, header, language, language, lastModified, location, newInstance, status, status, status, tag, tag, type, type, variant, variants
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLResponseBuilder

public URLResponseBuilder()
Method Detail

newInstance

public static javax.ws.rs.core.Response.ResponseBuilder newInstance(String url)
The same as newInstance(URL) but the URL is passed as String.


newInstance

public static javax.ws.rs.core.Response.ResponseBuilder newInstance(String url,
                                                                    Map<String,Object> data)
The same as newInstance(URL, Map) but the URL is passed as String.


newInstance

public static javax.ws.rs.core.Response.ResponseBuilder newInstance(URL url)
The same as newInstance(URL, Map) but no objects are passed to the URL.


newInstance

public static javax.ws.rs.core.Response.ResponseBuilder newInstance(URL url,
                                                                    Map<String,Object> data)
Create a Response.ResponseBuilder that retrieves all available information (header parameters, Last-Modified, Content-Type) from the URLConnection opened on the passed URL.

Parameters:
url - The URL that provides the content for the entity.
data - A Map of objects passed to the URL.
Returns:
A Response.ResponseBuilder


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.