com.sun.jersey.api.client.config
Class DefaultClientConfig

java.lang.Object
  extended by com.sun.jersey.api.client.config.DefaultClientConfig
All Implemented Interfaces:
ClientConfig, FeaturesAndProperties

public class DefaultClientConfig
extends java.lang.Object
implements ClientConfig

A default client configuration.

This class may be extended for specific confguration purposes.

Author:
Paul.Sandoz@Sun.Com

Field Summary
 
Fields inherited from interface com.sun.jersey.api.client.config.ClientConfig
PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION, PROPERTY_CHUNKED_ENCODING_SIZE, PROPERTY_CONNECT_TIMEOUT, PROPERTY_FOLLOW_REDIRECTS, PROPERTY_READ_TIMEOUT
 
Fields inherited from interface com.sun.jersey.core.util.FeaturesAndProperties
FEATURE_DISABLE_XML_SECURITY, FEATURE_FORMATTED
 
Constructor Summary
DefaultClientConfig()
           
 
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)
           
 java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
           
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
           
 java.lang.Object getProperty(java.lang.String propertyName)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultClientConfig

public DefaultClientConfig()
Method Detail

getClasses

public java.util.Set<java.lang.Class<?>> getClasses()
Description copied from interface: ClientConfig
Get the set of provider classes to be instantiated in the scope of the Client

A provider class is a Java class with a Provider annotation declared on the class that implements a specific service interface.

Specified by:
getClasses in interface ClientConfig
Returns:
the mutable set of provider classes. After intialization of the client modification of this value will have no effect. The returned value shall never be null.

getSingletons

public java.util.Set<java.lang.Object> getSingletons()
Description copied from interface: ClientConfig
Get the singleton provider instances to be utilized by the client.

When the client is initialized the set of provider instances will be combined and take precendence over the instances of provider classes.

Specified by:
getSingletons in interface ClientConfig
Returns:
the mutable set of provider instances. After intialization of the client modification of this value will have no effect. The returned value shall never be null.

getFeatures

public java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
Specified by:
getFeatures in interface FeaturesAndProperties

getFeature

public boolean getFeature(java.lang.String featureName)
Specified by:
getFeature in interface FeaturesAndProperties

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Specified by:
getProperties in interface FeaturesAndProperties

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Specified by:
getProperty in interface FeaturesAndProperties

getPropertyAsFeature

public boolean getPropertyAsFeature(java.lang.String name)
Description copied from interface: ClientConfig
Get a feature that is boolean property of the property bag.

Specified by:
getPropertyAsFeature in interface ClientConfig
Parameters:
name - the name of the feature;
Returns:
true if the feature value is present and is an instance of Boolean and that value is true, otherwise false.


Copyright © 2010 Sun Microsystems, Inc. All Rights Reserved.