T
- the type than implements RequestBuilder
.public abstract class PartialRequestBuilder<T extends RequestBuilder> extends java.lang.Object implements RequestBuilder<T>
RequestBuilder
that implements
the methods on RequestBuilder
but leaves undefined the build
methods for constructing the request.Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
entity |
protected MultivaluedMap<java.lang.String,java.lang.Object> |
metadata |
Modifier | Constructor and Description |
---|---|
protected |
PartialRequestBuilder() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected java.lang.Object entity
protected MultivaluedMap<java.lang.String,java.lang.Object> metadata
public T entity(java.lang.Object entity)
RequestBuilder
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.
entity
in interface RequestBuilder<T extends RequestBuilder>
entity
- the request entitypublic T entity(java.lang.Object entity, MediaType type)
RequestBuilder
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.
entity
in interface RequestBuilder<T extends RequestBuilder>
entity
- the request entitytype
- the media typepublic T entity(java.lang.Object entity, java.lang.String type)
RequestBuilder
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.
entity
in interface RequestBuilder<T extends RequestBuilder>
entity
- the request entitytype
- the media typepublic T type(MediaType type)
RequestBuilder
type
in interface RequestBuilder<T extends RequestBuilder>
type
- the media typepublic T type(java.lang.String type)
RequestBuilder
type
in interface RequestBuilder<T extends RequestBuilder>
type
- the media typepublic T accept(MediaType... types)
RequestBuilder
accept
in interface RequestBuilder<T extends RequestBuilder>
types
- an array of the acceptable media typespublic T accept(java.lang.String... types)
RequestBuilder
accept
in interface RequestBuilder<T extends RequestBuilder>
types
- an array of the acceptable media typespublic T acceptLanguage(java.util.Locale... locales)
RequestBuilder
acceptLanguage
in interface RequestBuilder<T extends RequestBuilder>
locales
- an array of the acceptable languagespublic T acceptLanguage(java.lang.String... locales)
RequestBuilder
acceptLanguage
in interface RequestBuilder<T extends RequestBuilder>
locales
- an array of the acceptable languagespublic T cookie(Cookie cookie)
RequestBuilder
cookie
in interface RequestBuilder<T extends RequestBuilder>
cookie
- to be set.public T header(java.lang.String name, java.lang.Object value)
RequestBuilder
header
in interface RequestBuilder<T extends RequestBuilder>
name
- the HTTP header name.value
- the HTTP header value.Copyright © 2016 Oracle Corporation. All Rights Reserved.