public class DefaultClientConfig extends 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(Class<?>... providers)
Create a new DefaultClientConfig instance
|
DefaultClientConfig(Set<Class<?>> providers)
Create a new DefaultClientConfig instance
|
Modifier and Type | Method and Description |
---|---|
Set<Class<?>> |
getClasses()
Get the set of provider classes to be instantiated in the scope
of the Client
|
boolean |
getFeature(String featureName)
Get the value of a feature.
|
Map<String,Boolean> |
getFeatures()
Get the map of features associated with the client.
|
Map<String,Object> |
getProperties()
Get the map of properties associated with the client.
|
Object |
getProperty(String propertyName)
Get the value of a property.
|
boolean |
getPropertyAsFeature(String name)
Get a feature that is boolean property of the property bag.
|
Set<Object> |
getSingletons()
Get the singleton provider instances to be utilized by the client.
|
public DefaultClientConfig()
public DefaultClientConfig(Class<?>... providers)
providers
- provider classes used during request processing.public Set<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 Set<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 Map<String,Boolean> getFeatures()
getFeatures
in interface FeaturesAndProperties
public boolean getFeature(String featureName)
getFeature
in interface FeaturesAndProperties
featureName
- the feature name.public Map<String,Object> getProperties()
getProperties
in interface FeaturesAndProperties
public Object getProperty(String propertyName)
getProperty
in interface FeaturesAndProperties
propertyName
- the property name.public boolean getPropertyAsFeature(String name)
getPropertyAsFeature
in interface ClientConfig
name
- the name of the feature;Boolean
and that value is true, otherwise false.Copyright © 2013 Oracle Corporation. All rights reserved.