org.glassfish.jersey.message.internal
Class OutboundJaxrsResponse.Builder

java.lang.Object
  extended by javax.ws.rs.core.Response.ResponseBuilder
      extended by org.glassfish.jersey.message.internal.OutboundJaxrsResponse.Builder
Enclosing class:
OutboundJaxrsResponse

public static class OutboundJaxrsResponse.Builder
extends Response.ResponseBuilder

Outbound JAX-RS Response.ResponseBuilder implementation. The implementation delegates method calls to an underlying outbound message context. Upon a call to a build() method a new instance of OutboundJaxrsResponse is produced.


Constructor Summary
OutboundJaxrsResponse.Builder(Response.StatusType status, OutboundMessageContext context)
          Create new outbound JAX-RS response builder.
 
Method Summary
 Response.ResponseBuilder allow(Set<String> methods)
           
 Response.ResponseBuilder allow(String... methods)
           
 Response build()
           
 Response.ResponseBuilder cacheControl(CacheControl cacheControl)
           
 Response.ResponseBuilder clone()
           
 Response.ResponseBuilder contentLocation(URI location)
           
 Response.ResponseBuilder cookie(NewCookie... cookies)
           
 Response.ResponseBuilder encoding(String encoding)
           
 Response.ResponseBuilder entity(Object entity)
           
 Response.ResponseBuilder entity(Object entity, Annotation[] annotations)
           
 Response.ResponseBuilder expires(Date expires)
           
 Response.ResponseBuilder header(String name, Object value)
           
 Response.ResponseBuilder language(Locale language)
           
 Response.ResponseBuilder language(String language)
           
 Response.ResponseBuilder lastModified(Date lastModified)
           
 Response.ResponseBuilder link(String uri, String rel)
           
 Response.ResponseBuilder link(URI uri, String rel)
           
 Response.ResponseBuilder links(Link... links)
           
 Response.ResponseBuilder location(URI location)
           
 Response.ResponseBuilder replaceAll(MultivaluedMap<String,Object> headers)
           
 Response.ResponseBuilder status(int code)
           
 Response.ResponseBuilder status(Response.StatusType status)
           
 Response.ResponseBuilder tag(EntityTag tag)
           
 Response.ResponseBuilder tag(String tag)
           
 Response.ResponseBuilder type(MediaType type)
           
 Response.ResponseBuilder type(String type)
           
 Response.ResponseBuilder variant(Variant variant)
           
 Response.ResponseBuilder variants(List<Variant> variants)
           
 Response.ResponseBuilder variants(Variant... variants)
           
 
Methods inherited from class javax.ws.rs.core.Response.ResponseBuilder
newInstance, status
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutboundJaxrsResponse.Builder

public OutboundJaxrsResponse.Builder(Response.StatusType status,
                                     OutboundMessageContext context)
Create new outbound JAX-RS response builder.

Parameters:
status - response status.
context - underlying outbound message context.
Method Detail

build

public Response build()
Specified by:
build in class Response.ResponseBuilder

clone

public Response.ResponseBuilder clone()
Overrides:
clone in class Response.ResponseBuilder

status

public Response.ResponseBuilder status(Response.StatusType status)
Overrides:
status in class Response.ResponseBuilder

status

public Response.ResponseBuilder status(int code)
Specified by:
status in class Response.ResponseBuilder

entity

public Response.ResponseBuilder entity(Object entity)
Specified by:
entity in class Response.ResponseBuilder

entity

public Response.ResponseBuilder entity(Object entity,
                                       Annotation[] annotations)
Specified by:
entity in class Response.ResponseBuilder

type

public Response.ResponseBuilder type(MediaType type)
Specified by:
type in class Response.ResponseBuilder

type

public Response.ResponseBuilder type(String type)
Specified by:
type in class Response.ResponseBuilder

variant

public Response.ResponseBuilder variant(Variant variant)
Specified by:
variant in class Response.ResponseBuilder

variants

public Response.ResponseBuilder variants(List<Variant> variants)
Specified by:
variants in class Response.ResponseBuilder

language

public Response.ResponseBuilder language(String language)
Specified by:
language in class Response.ResponseBuilder

language

public Response.ResponseBuilder language(Locale language)
Specified by:
language in class Response.ResponseBuilder

location

public Response.ResponseBuilder location(URI location)
Specified by:
location in class Response.ResponseBuilder

contentLocation

public Response.ResponseBuilder contentLocation(URI location)
Specified by:
contentLocation in class Response.ResponseBuilder

encoding

public Response.ResponseBuilder encoding(String encoding)
Specified by:
encoding in class Response.ResponseBuilder

tag

public Response.ResponseBuilder tag(EntityTag tag)
Specified by:
tag in class Response.ResponseBuilder

tag

public Response.ResponseBuilder tag(String tag)
Specified by:
tag in class Response.ResponseBuilder

lastModified

public Response.ResponseBuilder lastModified(Date lastModified)
Specified by:
lastModified in class Response.ResponseBuilder

cacheControl

public Response.ResponseBuilder cacheControl(CacheControl cacheControl)
Specified by:
cacheControl in class Response.ResponseBuilder

expires

public Response.ResponseBuilder expires(Date expires)
Specified by:
expires in class Response.ResponseBuilder

cookie

public Response.ResponseBuilder cookie(NewCookie... cookies)
Specified by:
cookie in class Response.ResponseBuilder

header

public Response.ResponseBuilder header(String name,
                                       Object value)
Specified by:
header in class Response.ResponseBuilder

variants

public Response.ResponseBuilder variants(Variant... variants)
Specified by:
variants in class Response.ResponseBuilder

links

public Response.ResponseBuilder links(Link... links)
Specified by:
links in class Response.ResponseBuilder

link

public Response.ResponseBuilder link(URI uri,
                                     String rel)
Specified by:
link in class Response.ResponseBuilder

link

public Response.ResponseBuilder link(String uri,
                                     String rel)
Specified by:
link in class Response.ResponseBuilder

allow

public Response.ResponseBuilder allow(String... methods)
Specified by:
allow in class Response.ResponseBuilder

allow

public Response.ResponseBuilder allow(Set<String> methods)
Specified by:
allow in class Response.ResponseBuilder

replaceAll

public Response.ResponseBuilder replaceAll(MultivaluedMap<String,Object> headers)
Specified by:
replaceAll in class Response.ResponseBuilder


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.