public class DefaultClientConfig extends java.lang.Object implements ClientConfig
This class may be extended for specific configuration purposes.
PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION, PROPERTY_CHUNKED_ENCODING_SIZE, PROPERTY_CONNECT_TIMEOUT, PROPERTY_FOLLOW_REDIRECTS, PROPERTY_READ_TIMEOUT, PROPERTY_THREADPOOL_SIZE
FEATURE_DISABLE_XML_SECURITY, FEATURE_FORMATTED, FEATURE_PRE_1_4_PROVIDER_PRECEDENCE, FEATURE_XMLROOTELEMENT_PROCESSING
Constructor and Description |
---|
DefaultClientConfig()
Create a new DefaultClientConfig instance
|
DefaultClientConfig(java.lang.Class<?>... providers)
Create a new DefaultClientConfig instance
|
DefaultClientConfig(java.util.Set<java.lang.Class<?>> providers)
Create a new DefaultClientConfig instance
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
getPropertyAsFeature(java.lang.String name)
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.
|
public DefaultClientConfig()
public DefaultClientConfig(java.lang.Class<?>... providers)
providers
- provider classes used during request processing.public DefaultClientConfig(java.util.Set<java.lang.Class<?>> providers)
providers
- set of provider classes used during request processing.public 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.
getClasses
in interface ClientConfig
public 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.
getSingletons
in interface ClientConfig
public java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
getFeatures
in interface FeaturesAndProperties
public boolean getFeature(java.lang.String featureName)
getFeature
in interface FeaturesAndProperties
featureName
- the feature name.public java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties
in interface FeaturesAndProperties
public java.lang.Object getProperty(java.lang.String propertyName)
getProperty
in interface FeaturesAndProperties
propertyName
- the property name.public boolean getPropertyAsFeature(java.lang.String name)
getPropertyAsFeature
in interface ClientConfig
name
- the name of the feature;Boolean
and that value is true, otherwise false.Copyright © 2016 Oracle Corporation. All Rights Reserved.