Class ResponseBuilderImpl


  • @Deprecated
    public class ResponseBuilderImpl
    extends javax.ws.rs.core.Response.ResponseBuilder
    Deprecated.
    Will be removed in next minor release.
    Implementation of the Response.ResponseBuilder.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> metadata
      Deprecated.
       
      private java.util.Map<java.lang.String,​javax.ws.rs.core.NewCookie> newCookies
      Deprecated.
       
      private ResponseImpl response
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      ResponseBuilderImpl()
      Deprecated.
      Creates a new Response Builder
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response build()
      Deprecated.
      Create a Response instance from the current ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder cacheControl​(javax.ws.rs.core.CacheControl cacheControl)
      Deprecated.
      Set the cache control data on the ResponseBuilder.
      ResponseBuilderImpl clone()
      Deprecated.
       
      javax.ws.rs.core.Response.ResponseBuilder contentLocation​(java.net.URI location)
      Deprecated.
      Set the content location on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder cookie​(javax.ws.rs.core.NewCookie... cookies)
      Deprecated.
      Add cookies to the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder encoding​(java.lang.String encoding)
      Deprecated.
      Set the language on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder entity​(java.lang.Object entity)
      Deprecated.
      Set the entity on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder expires​(java.util.Date expires)
      Deprecated.
       
      (package private) javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> getMetadata()
      Deprecated.
       
      (package private) java.util.Map<java.lang.String,​javax.ws.rs.core.NewCookie> getNewCookies()
      Deprecated.
       
      (package private) ResponseImpl getResponse()
      Deprecated.
       
      javax.ws.rs.core.Response.ResponseBuilder header​(java.lang.String name, java.lang.Object value)
      Deprecated.
      Add a header to the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder language​(java.lang.String language)
      Deprecated.
      Set the language on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder language​(java.util.Locale language)
      Deprecated.
      Set the language on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder lastModified​(java.util.Date lastModified)
      Deprecated.
      Set the last modified date on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder location​(java.net.URI location)
      Deprecated.
      Set the location on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder status​(int status)
      Deprecated.
      Set the status on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder tag​(java.lang.String tag)
      Deprecated.
      Set a strong entity tag on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder tag​(javax.ws.rs.core.EntityTag tag)
      Deprecated.
      Set the entity tag on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder type​(java.lang.String type)
      Deprecated.
      Set the response media type on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder type​(javax.ws.rs.core.MediaType type)
      Deprecated.
      Set the response media type on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder variant​(javax.ws.rs.core.Variant variant)
      Deprecated.
      Set representation metadata on the ResponseBuilder.
      javax.ws.rs.core.Response.ResponseBuilder variants​(java.util.List<javax.ws.rs.core.Variant> variants)
      Deprecated.
      Add a Vary header that lists the available variants.
      • Methods inherited from class javax.ws.rs.core.Response.ResponseBuilder

        newInstance, status, status
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • metadata

        private javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> metadata
        Deprecated.
      • newCookies

        private java.util.Map<java.lang.String,​javax.ws.rs.core.NewCookie> newCookies
        Deprecated.
    • Constructor Detail

      • ResponseBuilderImpl

        public ResponseBuilderImpl()
        Deprecated.
        Creates a new Response Builder
    • Method Detail

      • build

        public javax.ws.rs.core.Response build()
        Deprecated.
        Create a Response instance from the current ResponseBuilder. The builder is reset to a blank state equivalent to calling the ok method.
        Specified by:
        build in class javax.ws.rs.core.Response.ResponseBuilder
        Returns:
        a Response instance
        See Also:
        Response.ResponseBuilder.build()
      • cacheControl

        public javax.ws.rs.core.Response.ResponseBuilder cacheControl​(javax.ws.rs.core.CacheControl cacheControl)
        Deprecated.
        Set the cache control data on the ResponseBuilder.
        Specified by:
        cacheControl in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        cacheControl - the cache control directives
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.cacheControl(javax.ws.rs.core.CacheControl)
      • clone

        public ResponseBuilderImpl clone()
        Deprecated.
        Specified by:
        clone in class javax.ws.rs.core.Response.ResponseBuilder
        See Also:
        Response.ResponseBuilder.clone()
      • contentLocation

        public javax.ws.rs.core.Response.ResponseBuilder contentLocation​(java.net.URI location)
        Deprecated.
        Set the content location on the ResponseBuilder.
        Specified by:
        contentLocation in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        location - the content location
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.contentLocation(java.net.URI)
      • cookie

        public javax.ws.rs.core.Response.ResponseBuilder cookie​(javax.ws.rs.core.NewCookie... cookies)
        Deprecated.
        Add cookies to the ResponseBuilder. If more than one cookie with the same is supplied, later ones overwrite earlier ones.
        Specified by:
        cookie in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        cookies - new cookies that will accompany the response.
        Returns:
        the updated ResponseBuilder
        See Also:
        javax.ws.rs.core.Response.ResponseBuilder#cookie(javax.ws.rs.core.NewCookie)
      • encoding

        public javax.ws.rs.core.Response.ResponseBuilder encoding​(java.lang.String encoding)
        Deprecated.
        Set the language on the ResponseBuilder.
        This method is not required by the JAX-RS API bu is used from variant(Variant).
        Parameters:
        encoding - the encoding of the response entity
        Returns:
        the updated ResponseBuilder
      • entity

        public javax.ws.rs.core.Response.ResponseBuilder entity​(java.lang.Object entity)
        Deprecated.
        Set the entity on the ResponseBuilder.
        Specified by:
        entity in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        entity - the response entity
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.entity(java.lang.Object)
      • expires

        public javax.ws.rs.core.Response.ResponseBuilder expires​(java.util.Date expires)
        Deprecated.
        Specified by:
        expires in class javax.ws.rs.core.Response.ResponseBuilder
        See Also:
        Response.ResponseBuilder.expires(java.util.Date)
      • getMetadata

        javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> getMetadata()
        Deprecated.
      • getNewCookies

        java.util.Map<java.lang.String,​javax.ws.rs.core.NewCookie> getNewCookies()
        Deprecated.
      • header

        public javax.ws.rs.core.Response.ResponseBuilder header​(java.lang.String name,
                                                                java.lang.Object value)
        Deprecated.
        Add a header to the ResponseBuilder.
        Specified by:
        header in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        name - the name of the header
        value - the value of the header, the header will be serialized using its toString method. If null then all current headers of the same name will be removed.
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.header(String, Object)
      • language

        public javax.ws.rs.core.Response.ResponseBuilder language​(java.util.Locale language)
        Deprecated.
        Set the language on the ResponseBuilder.
        Specified by:
        language in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        language - the language of the response entity
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.language(java.lang.String)
      • language

        public javax.ws.rs.core.Response.ResponseBuilder language​(java.lang.String language)
        Deprecated.
        Set the language on the ResponseBuilder.
        Specified by:
        language in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        language - the language of the response entity
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.language(java.lang.String)
      • lastModified

        public javax.ws.rs.core.Response.ResponseBuilder lastModified​(java.util.Date lastModified)
        Deprecated.
        Set the last modified date on the ResponseBuilder.
        Specified by:
        lastModified in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        lastModified - the last modified date
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.lastModified(java.util.Date)
      • location

        public javax.ws.rs.core.Response.ResponseBuilder location​(java.net.URI location)
        Deprecated.
        Set the location on the ResponseBuilder.
        Specified by:
        location in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        location - the location
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.location(java.net.URI)
      • status

        public javax.ws.rs.core.Response.ResponseBuilder status​(int status)
        Deprecated.
        Set the status on the ResponseBuilder.
        Specified by:
        status in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        status - the response status
        Returns:
        the updated ResponseBuilder
        Throws:
        java.lang.IllegalArgumentException - if status is less than 100 or greater than 599.
        See Also:
        Response.ResponseBuilder.status(int)
      • tag

        public javax.ws.rs.core.Response.ResponseBuilder tag​(javax.ws.rs.core.EntityTag tag)
        Deprecated.
        Set the entity tag on the ResponseBuilder.
        Specified by:
        tag in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        tag - the entity tag
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.tag(javax.ws.rs.core.EntityTag)
      • tag

        public javax.ws.rs.core.Response.ResponseBuilder tag​(java.lang.String tag)
        Deprecated.
        Set a strong entity tag on the ResponseBuilder. This is a shortcut for tag(new EntityTag(value)).
        Specified by:
        tag in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        tag - the string content of a strong entity tag. The JAX-RS runtime will quote the supplied value when creating the header.
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.tag(java.lang.String)
      • type

        public javax.ws.rs.core.Response.ResponseBuilder type​(javax.ws.rs.core.MediaType type)
        Deprecated.
        Set the response media type on the ResponseBuilder.
        Specified by:
        type in class javax.ws.rs.core.Response.ResponseBuilder
        See Also:
        Response.ResponseBuilder.type(javax.ws.rs.core.MediaType)
      • type

        public javax.ws.rs.core.Response.ResponseBuilder type​(java.lang.String type)
        Deprecated.
        Set the response media type on the ResponseBuilder.
        Specified by:
        type in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        type - the media type of the response entity
        Returns:
        the updated ResponseBuilder
        Throws:
        java.lang.IllegalArgumentException - if type cannot be parsed
        See Also:
        Response.ResponseBuilder.type(java.lang.String)
      • variant

        public javax.ws.rs.core.Response.ResponseBuilder variant​(javax.ws.rs.core.Variant variant)
        Deprecated.
        Set representation metadata on the ResponseBuilder.
        Specified by:
        variant in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        variant - metadata of the response entity
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.variant(javax.ws.rs.core.Variant)
      • variants

        public javax.ws.rs.core.Response.ResponseBuilder variants​(java.util.List<javax.ws.rs.core.Variant> variants)
        Deprecated.
        Add a Vary header that lists the available variants.
        Specified by:
        variants in class javax.ws.rs.core.Response.ResponseBuilder
        Parameters:
        variants - a list of available representation variants, a null value will remove an existing value for vary.
        Returns:
        the updated ResponseBuilder
        See Also:
        Response.ResponseBuilder.variants(java.util.List)