public class ConfigurationImpl extends Object implements Configuration
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE |
| Constructor and Description |
|---|
ConfigurationImpl() |
| Modifier and Type | Method and Description |
|---|---|
ContentType |
getDefaultBatchAcceptFormat()
Gets the configured default Accept header value format for a batch request.
|
ContentType |
getDefaultFormat()
Gets the configured OData format.
|
ContentType |
getDefaultMediaFormat()
Gets the configured OData media format.
|
ContentType |
getDefaultPubFormat()
Gets the configured OData format for AtomPub exchanges.
|
ContentType |
getDefaultValueFormat()
Gets the configured OData value format.
|
ExecutorService |
getExecutor()
Retrieves request executor service.
|
HttpClientFactory |
getHttpClientFactory()
Gets the HttpClient factory to be used for executing requests.
|
HttpUriRequestFactory |
getHttpUriRequestFactory()
Gets the HttpUriRequest factory for generating requests to be executed.
|
protected Object |
getProperty(String key,
Object defaultValue)
Gets given configuration property.
|
boolean |
isAddressingDerivedTypes()
Gets whether query URIs in request should contain fully qualified type name.
|
boolean |
isContinueOnError()
When processing a set of requests (in batch requests, for example), checks if the execution will be aborted after
first error encountered or not.
|
boolean |
isGzipCompression()
Checks whether Gzip compression (e.g.
|
boolean |
isKeyAsSegment()
Checks whether URIs contain entity key between parentheses (standard) or instead as additional segment
(non-standard).
|
boolean |
isUseChuncked()
Checks whether chunk HTTP encoding is being used.
|
boolean |
isUseUrlOperationFQN()
Checks whether operation name in request URI should be fully qualified name, which is required by OData V4
protocol, but some service may still choose to support shorter name.
|
boolean |
isUseXHTTPMethod()
Gets whether PUT, MERGE, PATCH, DELETE HTTP methods need to be translated to
POST with additional X-HTTTP-Method header.
|
void |
setAddressingDerivedTypes(boolean value)
Sets whether query URIs in request should contain fully qualified type name.
|
void |
setContinueOnError(boolean value)
When processing a set of requests (in batch requests, for example), sets if the execution will be aborted after
first error encountered or not.
|
void |
setDefaultBatchAcceptFormat(ContentType contentType)
Set the default Accept header value format for a batch request.
|
void |
setDefaultMediaFormat(ContentType contentType)
Sets the default OData media format.
|
void |
setDefaultPubFormat(ContentType contentType)
Sets the default OData format for AtomPub exchanges.
|
void |
setDefaultValueFormat(ContentType contentType)
Sets the default OData value format.
|
void |
setExecutor(ExecutorService executorService)
Sets request executor service.
|
void |
setGzipCompression(boolean value)
Sets Gzip compression (e.g.
|
void |
setHttpClientFactory(HttpClientFactory factory)
Sets the HttpClient factory to be used for executing requests.
|
void |
setHttpUriRequestFactory(HttpUriRequestFactory factory)
Sets the HttpUriRequest factory generating requests to be executed.
|
void |
setKeyAsSegment(boolean value)
Sets whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment
(non-standard).
|
protected Object |
setProperty(String key,
Object value)
Sets new configuration property.
|
void |
setUseChuncked(boolean value)
Sets chunk HTTP encoding enabled or disabled.
|
void |
setUseUrlOperationFQN(boolean value)
Sets whether operation name in request URI should be fully qualified name, which is required by OData V4 protocol,
but some service may still choose to support shorter name.
|
void |
setUseXHTTPMethod(boolean value)
Sets whether PUT, MERGE, PATCH, DELETE HTTP methods need to be translated to
POST with additional X-HTTTP-Method header.
|
public static final int DEFAULT_BUFFER_SIZE
protected Object getProperty(String key, Object defaultValue)
key - key value of the property to be retrieved.defaultValue - default value to be used in case of the given key doesn't exist.protected Object setProperty(String key, Object value)
key - configuration property key.value - configuration property value.public ContentType getDefaultBatchAcceptFormat()
ConfigurationgetDefaultBatchAcceptFormat in interface Configurationpublic void setDefaultBatchAcceptFormat(ContentType contentType)
ConfigurationsetDefaultBatchAcceptFormat in interface ConfigurationcontentType - default Accept header value.public ContentType getDefaultPubFormat()
ConfigurationgetDefaultPubFormat in interface Configurationpublic void setDefaultPubFormat(ContentType contentType)
ConfigurationsetDefaultPubFormat in interface ConfigurationcontentType - default format.public ContentType getDefaultFormat()
ConfigurationgetDefaultFormat in interface ConfigurationConfiguration.getDefaultPubFormat()public ContentType getDefaultValueFormat()
ConfigurationgetDefaultValueFormat in interface Configurationpublic void setDefaultValueFormat(ContentType contentType)
ConfigurationsetDefaultValueFormat in interface ConfigurationcontentType - default format.public ContentType getDefaultMediaFormat()
ConfigurationgetDefaultMediaFormat in interface Configurationpublic void setDefaultMediaFormat(ContentType contentType)
ConfigurationsetDefaultMediaFormat in interface ConfigurationcontentType - default format.public HttpClientFactory getHttpClientFactory()
ConfigurationgetHttpClientFactory in interface Configurationpublic void setHttpClientFactory(HttpClientFactory factory)
ConfigurationsetHttpClientFactory in interface Configurationfactory - implementation of HttpClientFactory.HttpClientFactorypublic HttpUriRequestFactory getHttpUriRequestFactory()
ConfigurationgetHttpUriRequestFactory in interface Configurationpublic void setHttpUriRequestFactory(HttpUriRequestFactory factory)
ConfigurationsetHttpUriRequestFactory in interface Configurationfactory - implementation of HttpUriRequestFactory.HttpUriRequestFactorypublic boolean isUseXHTTPMethod()
ConfigurationisUseXHTTPMethod in interface Configurationpublic void setUseXHTTPMethod(boolean value)
ConfigurationsetUseXHTTPMethod in interface Configurationvalue - 'TRUE' to use tunneling.public boolean isGzipCompression()
ConfigurationisGzipCompression in interface Configurationpublic void setGzipCompression(boolean value)
ConfigurationsetGzipCompression in interface Configurationvalue - whether to use Gzip compression.public boolean isUseChuncked()
ConfigurationisUseChuncked in interface Configurationpublic void setUseChuncked(boolean value)
ConfigurationsetUseChuncked in interface Configurationvalue - whether to use chunk HTTP encoding.public boolean isKeyAsSegment()
ConfigurationisKeyAsSegment in interface Configurationpublic void setKeyAsSegment(boolean value)
ConfigurationsetKeyAsSegment in interface Configurationvalue - 'TRUE' to use this feature.public boolean isAddressingDerivedTypes()
ConfigurationisAddressingDerivedTypes in interface Configurationpublic void setAddressingDerivedTypes(boolean value)
ConfigurationsetAddressingDerivedTypes in interface Configurationvalue - 'TRUE' to use this feature.public boolean isUseUrlOperationFQN()
ConfigurationisUseUrlOperationFQN in interface Configurationpublic void setUseUrlOperationFQN(boolean value)
ConfigurationsetUseUrlOperationFQN in interface Configurationvalue - 'TRUE' to use this feature.public boolean isContinueOnError()
ConfigurationisContinueOnError in interface Configurationpublic void setContinueOnError(boolean value)
ConfigurationsetContinueOnError in interface Configurationvalue - 'TRUE' to use this feature.public ExecutorService getExecutor()
ConfigurationgetExecutor in interface Configurationpublic void setExecutor(ExecutorService executorService)
ConfigurationsetExecutor in interface ConfigurationexecutorService - new executor services.Copyright © 2023. All rights reserved.