de.smartics.resteasy.hypermedia.renderer
Class ResourceContext.Builder

Package class diagram package ResourceContext.Builder
java.lang.Object
  extended by de.smartics.resteasy.hypermedia.renderer.ResourceContext.Builder
Enclosing class:
ResourceContext

public static final class ResourceContext.Builder
     
     
extends Object

Builds instances of ResourceContext.


Constructor Summary
ResourceContext.Builder()
           
 
Method Summary
 ResourceContext build()
          Creates the instance.
 ResourceContext.Builder with(Annotation[] annotations)
          Sets the array of the annotations attached to the message entity instance.
 ResourceContext.Builder with(javax.servlet.http.HttpServletRequest request)
          Sets the access to the HTTP request.
 ResourceContext.Builder with(javax.servlet.http.HttpServletResponse response)
          Sets the access to the HTTP response.
 ResourceContext.Builder with(LocalizationProvider l7nProvider)
          Sets the helper to access localized information.
 ResourceContext.Builder with(javax.ws.rs.core.MediaType mediaType)
          Sets the media type of the HTTP entity.
 ResourceContext.Builder with(Resources discovery)
          Sets the repository of resource link exits.
 ResourceContext.Builder with(javax.ws.rs.core.UriInfo uriInfo)
          Sets the helper to construct URIs.
 ResourceContext.Builder withGenericType(Type genericType)
          Sets the type of instance to be written.
 ResourceContext.Builder withHttpHeaders(javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders)
          Sets the mutable map of the HTTP message headers.
 ResourceContext.Builder withType(Class<?> type)
          Sets the class of instance that is to be written.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceContext.Builder

public ResourceContext.Builder()
Method Detail

with

public ResourceContext.Builder with(javax.servlet.http.HttpServletRequest request)
Sets the access to the HTTP request.

Parameters:
request - the access to the HTTP request.
Returns:
a reference to this builder instance.

with

public ResourceContext.Builder with(javax.servlet.http.HttpServletResponse response)
Sets the access to the HTTP response.

Parameters:
response - the access to the HTTP response.
Returns:
a reference to this builder instance.

with

public ResourceContext.Builder with(javax.ws.rs.core.UriInfo uriInfo)
Sets the helper to construct URIs.

Parameters:
uriInfo - the helper to construct URIs.
Returns:
a reference to this builder instance.

with

public ResourceContext.Builder with(LocalizationProvider l7nProvider)
Sets the helper to access localized information.

Parameters:
l7nProvider - the helper to access localized information.
Returns:
a reference to this builder instance.

with

public ResourceContext.Builder with(Resources discovery)
Sets the repository of resource link exits.

Parameters:
discovery - the repository of resource link exits.
Returns:
a reference to this builder instance.

withType

public ResourceContext.Builder withType(Class<?> type)
Sets the class of instance that is to be written.

Parameters:
type - the class of instance that is to be written.
Returns:
a reference to this builder instance.

withGenericType

public ResourceContext.Builder withGenericType(Type genericType)
Sets the type of instance to be written. GenericEntityprovides a way to specify this information at runtime.

Parameters:
genericType - the type of instance to be written.
Returns:
a reference to this builder instance.

with

public ResourceContext.Builder with(Annotation[] annotations)
Sets the array of the annotations attached to the message entity instance.

Parameters:
annotations - the array of the annotations attached to the message entity instance.
Returns:
a reference to this builder instance.

with

public ResourceContext.Builder with(javax.ws.rs.core.MediaType mediaType)
Sets the media type of the HTTP entity.

Parameters:
mediaType - the media type of the HTTP entity.
Returns:
a reference to this builder instance.

withHttpHeaders

public ResourceContext.Builder withHttpHeaders(javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders)
Sets the mutable map of the HTTP message headers.

Parameters:
httpHeaders - the mutable map of the HTTP message headers.
Returns:
a reference to this builder instance.

build

public ResourceContext build()
Creates the instance.

Returns:
the instance.


Copyright © 2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.