public static interface InvocationBuilderListener.InvocationBuilderContext
Invocation.Builder subset of setter methods.| Modifier and Type | Method and Description |
|---|---|
InvocationBuilderListener.InvocationBuilderContext |
accept(MediaType... mediaTypes)
Add the accepted response media types.
|
InvocationBuilderListener.InvocationBuilderContext |
accept(String... mediaTypes)
Add the accepted response media types.
|
InvocationBuilderListener.InvocationBuilderContext |
acceptEncoding(String... encodings)
Add acceptable encodings.
|
InvocationBuilderListener.InvocationBuilderContext |
acceptLanguage(Locale... locales)
Add acceptable languages.
|
InvocationBuilderListener.InvocationBuilderContext |
acceptLanguage(String... locales)
Add acceptable languages.
|
InvocationBuilderListener.InvocationBuilderContext |
cacheControl(CacheControl cacheControl)
Set the cache control data of the message.
|
InvocationBuilderListener.InvocationBuilderContext |
cookie(Cookie cookie)
Add a cookie to be set.
|
InvocationBuilderListener.InvocationBuilderContext |
cookie(String name,
String value)
Add a cookie to be set.
|
List<String> |
getAccepted()
Get the accepted response media types.
|
List<String> |
getAcceptedLanguages()
Get acceptable languages.
|
List<CacheControl> |
getCacheControls()
Get the cache control data of the message.
|
Configuration |
getConfiguration()
Get runtime configuration.
|
Map<String,Cookie> |
getCookies()
Get any cookies that accompanied the request.
|
List<String> |
getEncodings()
Get acceptable encodings.
|
List<String> |
getHeader(String name)
Get the values of a HTTP request header.
|
MultivaluedMap<String,Object> |
getHeaders()
Get the mutable message headers multivalued map.
|
Object |
getProperty(String name)
Returns the property with the given name registered in the current request/response
exchange context, or
null if there is no property by that name. |
Collection<String> |
getPropertyNames()
Returns an immutable
collection containing the property names
available within the context of the current request/response exchange context. |
URI |
getUri()
Get the request URI.
|
InvocationBuilderListener.InvocationBuilderContext |
header(String name,
Object value)
Add an arbitrary header.
|
InvocationBuilderListener.InvocationBuilderContext |
headers(MultivaluedMap<String,Object> headers)
Replaces all existing headers with the newly supplied headers.
|
InvocationBuilderListener.InvocationBuilderContext |
property(String name,
Object value)
Set a new property in the context of a request represented by this invocation builder.
|
void |
removeProperty(String name)
Removes a property with the given name from the current request/response
exchange context.
|
InvocationBuilderListener.InvocationBuilderContext accept(String... mediaTypes)
mediaTypes - accepted response media types.InvocationBuilderListener.InvocationBuilderContext accept(MediaType... mediaTypes)
mediaTypes - accepted response media types.InvocationBuilderListener.InvocationBuilderContext acceptLanguage(Locale... locales)
locales - an array of the acceptable languages.InvocationBuilderListener.InvocationBuilderContext acceptLanguage(String... locales)
locales - an array of the acceptable languages.InvocationBuilderListener.InvocationBuilderContext acceptEncoding(String... encodings)
encodings - an array of the acceptable encodings.InvocationBuilderListener.InvocationBuilderContext cookie(Cookie cookie)
cookie - to be set.InvocationBuilderListener.InvocationBuilderContext cookie(String name, String value)
name - the name of the cookie.value - the value of the cookie.InvocationBuilderListener.InvocationBuilderContext cacheControl(CacheControl cacheControl)
cacheControl - the cache control directives, if null
any existing cache control directives will be removed.List<String> getAccepted()
List<String> getAcceptedLanguages()
List<CacheControl> getCacheControls()
Configuration getConfiguration()
Map<String,Cookie> getCookies()
Cookie.List<String> getHeader(String name)
name - the header name, case insensitive.MultivaluedMap<String,Object> getHeaders()
Object getProperty(String name)
null if there is no property by that name.
A property allows filters and interceptors to exchange additional custom information not already provided by this interface.
A list of supported properties can be retrieved using getPropertyNames().
Custom property names should follow the same convention as package names.
name - a String specifying the name of the property.Object containing the value of the property, or
null if no property exists matching the given name.getPropertyNames()Collection<String> getPropertyNames()
collection containing the property names
available within the context of the current request/response exchange context.
Use the getProperty(java.lang.String) method with a property name to get the value of
a property.
collection of property names.getProperty(java.lang.String)URI getUri()
InvocationBuilderListener.InvocationBuilderContext header(String name, Object value)
name - the name of the headervalue - the value of the header, the header will be serialized
using a RuntimeDelegate.HeaderDelegate if
one is available via RuntimeDelegate.createHeaderDelegate(java.lang.Class)
for the class of value or using its toString method
if a header delegate is not available. If value is null
then all current headers of the same name will be removed.InvocationBuilderListener.InvocationBuilderContext headers(MultivaluedMap<String,Object> headers)
headers - new headers to be set, if null all existing
headers will be removed.InvocationBuilderListener.InvocationBuilderContext property(String name, Object value)
The property is available for a later retrieval via ClientRequestContext.getProperty(String)
or InterceptorContext.getProperty(String).
If a property with a given name is already set in the request context,
the existing value of the property will be updated.
Setting a null value into a property effectively removes the property
from the request property bag.
name - property name.value - (new) property value. null value removes the property
with the given name.Invocation.property(String, Object)void removeProperty(String name)
getProperty(java.lang.String)
to retrieve the property value will return null.name - a String specifying the name of the property to be removed.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.