## com.sun.jersey.api.client
Class PartialRequestBuilder<T extends RequestBuilder>

    java.lang.Object
      com.sun.jersey.api.client.PartialRequestBuilder<T>

Type Parameters:
  `T` - the type than implements `RequestBuilder`.

All Implemented Interfaces:
  RequestBuilder<T>

Direct Known Subclasses:
  AsyncViewResource.Builder, AsyncWebResource.Builder, ClientRequest.Builder, ViewResource.Builder, WebResource.Builder

    public abstract class PartialRequestBuilder<T extends RequestBuilder>

extends java.lang.Object
implements RequestBuilder<T>

A partial implementation of `RequestBuilder` that implements the methods on `RequestBuilder` but leaves undefined the build methods for constructing the request.

Author:
  Paul.Sandoz@Sun.Com

Field Summary
`protected java.lang.Object` | `entity`
`protected MultivaluedMap<java.lang.String,java.lang.Object>` | `metadata`

Constructor Summary
`protected` | `PartialRequestBuilder()`

Method Summary
`T` | `accept(MediaType... types)` Add acceptable media types.
`T` | `accept(java.lang.String... types)` Add acceptable media types.
`T` | `acceptLanguage(java.util.Locale... locales)` Add acceptable languages
`T` | `acceptLanguage(java.lang.String... locales)` Add acceptable languages
`T` | `cookie(Cookie cookie)` Add a cookie to be set.
`T` | `entity(java.lang.Object entity)` Set the request entity.
`T` | `entity(java.lang.Object entity, MediaType type)` Set the request entity with its media type.
`T` | `entity(java.lang.Object entity, java.lang.String type)` Set the request entity with its media type.
`T` | `header(java.lang.String name, java.lang.Object value)` Add an HTTP header and value.
`T` | `type(MediaType type)` Set the media type.
`T` | `type(java.lang.String type)` Set the media type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### entity

    protected java.lang.Object entity

### metadata

    protected MultivaluedMap<java.lang.String,java.lang.Object> metadata

Constructor Detail

### PartialRequestBuilder

    protected PartialRequestBuilder()

Method Detail

### entity

    public T entity(java.lang.Object entity)

  Description copied from interface: `RequestBuilder`
  Set the request entity.

  Any Java type instance for a request entity, that is supported by the client configuration of the client, can be passed. If generic information is required then an instance of `GenericEntity` may be used.

  Specified by:
    `entity` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `entity` - the request entity
  Returns:
    the builder.

### entity

    public T entity(java.lang.Object entity,
                    MediaType type)

  Description copied from interface: `RequestBuilder`
  Set the request entity with its media type.

  Any Java type instance for a request entity, that is supported by the client configuration of the client, can be passed. If generic information is required then an instance of `GenericEntity` may be used.

  Specified by:
    `entity` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `entity` - the request entity
    `type` - the media type
  Returns:
    the builder.

### entity

    public T entity(java.lang.Object entity,
                    java.lang.String type)

  Description copied from interface: `RequestBuilder`
  Set the request entity with its media type.

  Any Java type instance for a request entity, that is supported by the client configuration of the client, can be passed. If generic information is required then an instance of `GenericEntity` may be used.

  Specified by:
    `entity` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `entity` - the request entity
    `type` - the media type
  Returns:
    the builder.

### type

    public T type(MediaType type)

  Description copied from interface: `RequestBuilder`
  Set the media type.

  Specified by:
    `type` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `type` - the media type
  Returns:
    the builder.

### type

    public T type(java.lang.String type)

  Description copied from interface: `RequestBuilder`
  Set the media type.

  Specified by:
    `type` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `type` - the media type
  Returns:
    the builder.

### accept

    public T accept(MediaType... types)

  Description copied from interface: `RequestBuilder`
  Add acceptable media types.

  Specified by:
    `accept` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `types` - an array of the acceptable media types
  Returns:
    the builder.

### accept

    public T accept(java.lang.String... types)

  Description copied from interface: `RequestBuilder`
  Add acceptable media types.

  Specified by:
    `accept` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `types` - an array of the acceptable media types
  Returns:
    the builder.

### acceptLanguage

    public T acceptLanguage(java.util.Locale... locales)

  Description copied from interface: `RequestBuilder`
  Add acceptable languages

  Specified by:
    `acceptLanguage` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `locales` - an array of the acceptable languages
  Returns:
    the builder.

### acceptLanguage

    public T acceptLanguage(java.lang.String... locales)

  Description copied from interface: `RequestBuilder`
  Add acceptable languages

  Specified by:
    `acceptLanguage` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `locales` - an array of the acceptable languages
  Returns:
    the builder.

### cookie

    public T cookie(Cookie cookie)

  Description copied from interface: `RequestBuilder`
  Add a cookie to be set.

  Specified by:
    `cookie` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `cookie` - to be set.
  Returns:
    the builder

### header

    public T header(java.lang.String name,
                    java.lang.Object value)

  Description copied from interface: `RequestBuilder`
  Add an HTTP header and value.

  Specified by:
    `header` in interface `RequestBuilder<T extends RequestBuilder>`
  Parameters:
    `name` - the HTTP header name.
    `value` - the HTTP header value.
  Returns:
    the builder.

Copyright © 2017 Oracle Corporation. All Rights Reserved.