Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      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 configuration 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, PROPERTY_THREADPOOL_SIZE`

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`

Constructor Summary
`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

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.
`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()

  Create a new DefaultClientConfig instance

### DefaultClientConfig

    public DefaultClientConfig(java.lang.Class<?>... providers)

  Create a new DefaultClientConfig instance

  Parameters:
    `providers` - provider classes used during request processing.

### DefaultClientConfig

    public DefaultClientConfig(java.util.Set<java.lang.Class<?>> providers)

  Create a new DefaultClientConfig instance

  Parameters:
    `providers` - set of provider classes used during request processing.

Method Detail

### getClasses

    public java.util.Set<java.lang.Class<?>> getClasses()

  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 initialization 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()

  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 precedence over the instances of provider classes.

  Specified by:
    `getSingletons` in interface `ClientConfig`
  Returns:
    the mutable set of provider instances. After initialization 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()

  Get the map of features associated with the client.

  Specified by:
    `getFeatures` in interface `FeaturesAndProperties`
  Returns:
    the features. The returned value shall never be null.

### getFeature

    public boolean getFeature(java.lang.String featureName)

  Get the value of a feature.

  Specified by:
    `getFeature` in interface `FeaturesAndProperties`
  Parameters:
    `featureName` - the feature name.
  Returns:
    true if the feature is present and set to true, otherwise false if the feature is present and set to false or the feature is not present.

### getProperties

    public java.util.Map<java.lang.String,java.lang.Object> getProperties()

  Get the map of properties associated with the client.

  Specified by:
    `getProperties` in interface `FeaturesAndProperties`
  Returns:
    the properties. The returned value shall never be null.

### getProperty

    public java.lang.Object getProperty(java.lang.String propertyName)

  Get the value of a property.

  Specified by:
    `getProperty` in interface `FeaturesAndProperties`
  Parameters:
    `propertyName` - the property name.
  Returns:
    the property, or null if there is no property present for the given property name.

### getPropertyAsFeature

    public boolean getPropertyAsFeature(java.lang.String name)

  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 Oracle Corporation. All Rights Reserved.