|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClientConfig
The client configuration that declares common property names,
features, properties, provider classes and singleton instances that
may be used by a Client
instance.
An instance of this interface may be passed to the Client
when
the client is created as follows:
The client configuration may be used to register provider classes such as those, for example, that support JAXB with JSON as follows:ClientConfig cc = ... Client c = Client.create(cc);
Alternatively an implementation of ClientConfig could perform such registration.ClientConfig cc = new DefaultClientConfig(); cc.getClasses().add(com.sun.jersey.impl.provider.entity.JSONRootElementProvider.class); Client c = Client.create(cc);
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION
A value of "true" declares that the client will automatically buffer the response entity (if any) and close resources when a UniformInterfaceException is thrown. |
static java.lang.String |
PROPERTY_CHUNKED_ENCODING_SIZE
Chunked encoding property. |
static java.lang.String |
PROPERTY_CONNECT_TIMEOUT
Connect timeout interval property, in milliseconds. |
static java.lang.String |
PROPERTY_FOLLOW_REDIRECTS
Redirection property. |
static java.lang.String |
PROPERTY_READ_TIMEOUT
Read timeout interval property, in milliseconds. |
static java.lang.String |
PROPERTY_THREADPOOL_SIZE
Threadpool size property. |
Fields inherited from interface com.sun.jersey.core.util.FeaturesAndProperties |
---|
FEATURE_DISABLE_XML_SECURITY, FEATURE_FORMATTED, FEATURE_PRE_1_4_PROVIDER_PRECEDENCE, FEATURE_XMLROOTELEMENT_PROCESSING |
Method Summary | |
---|---|
java.util.Set<java.lang.Class<?>> |
getClasses()
Get the set of provider classes to be instantiated in the scope of the Client |
boolean |
getPropertyAsFeature(java.lang.String featureName)
Get a feature that is boolean property of the property bag. |
java.util.Set<java.lang.Object> |
getSingletons()
Get the singleton provider instances to be utilized by the client. |
Methods inherited from interface com.sun.jersey.core.util.FeaturesAndProperties |
---|
getFeature, getFeatures, getProperties, getProperty |
Field Detail |
---|
static final java.lang.String PROPERTY_FOLLOW_REDIRECTS
Boolean
.
If the property is absent then the default value is "true".
static final java.lang.String PROPERTY_READ_TIMEOUT
Integer
.
If the property is absent then the default value is an interval of
infinity. A value of zero 0 is equivalent to an interval of
infinity
static final java.lang.String PROPERTY_CONNECT_TIMEOUT
Integer
.
If the property is absent then the default value is an interval of
infinity. A value of 0 is equivalent to an interval of
infinity
static final java.lang.String PROPERTY_CHUNKED_ENCODING_SIZE
Integer
.
If the property is absent then chunked encoding will not be used.
A value < = 0 declares that chunked encoding will be used with
the default chunk size. A value > 0 declares that chunked encoding
will be used with the value as the declared chunk size.
static final java.lang.String PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION
Boolean
.
If the property is absent then the default value is "true".
static final java.lang.String PROPERTY_THREADPOOL_SIZE
Integer
.
If the property is absent then threadpool used for async requests will
be initialized as default cached threadpool, which creates new thread
for every new request, see Executors
. When
value bigger than zero is provided, cached threadpool limited to that
number of threads will be utilized.
Method Detail |
---|
java.util.Set<java.lang.Class<?>> getClasses()
A provider class is a Java class with a Provider
annotation declared on the class that implements a specific service
interface.
java.util.Set<java.lang.Object> getSingletons()
When the client is initialized the set of provider instances will be combined and take precedence over the instances of provider classes.
boolean getPropertyAsFeature(java.lang.String featureName)
featureName
- the name of the feature;
Boolean
and that value is true, otherwise false.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |