|
||||||||||
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 implementaton of ClientConfig could perform such registeration.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_CHUNKED_ENCODING_SIZE
Chunked encoding property. |
static java.lang.String |
PROPERTY_CONNECT_TIMEOUT
Connect timeout interval property. |
static java.lang.String |
PROPERTY_FOLLOW_REDIRECTS
Redirection property. |
static java.lang.String |
PROPERTY_READ_TIMEOUT
Read timeout interval property. |
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 |
getFeature(java.lang.String featureName)
Get the value of a feature. |
java.util.Map<java.lang.String,java.lang.Boolean> |
getFeatures()
Get the map of features associated with the client. |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Get the map of properties associated with the client. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Get the value of a property. |
java.util.Set<java.lang.Object> |
getSingletons()
Get the singleton provider instances to be utilized by the client. |
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.
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 precendence over the instances of provider classes.
java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
boolean getFeature(java.lang.String featureName)
featureName
- the feature name.
java.util.Map<java.lang.String,java.lang.Object> getProperties()
java.lang.Object getProperty(java.lang.String propertyName)
propertyName
- the property name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |