R - the type of the TypeMappingRegistryE - the type of the EntryPointpublic abstract class Configuration<R extends TypeMappingRegistry<?>,E extends EntryPoint<?,?>> extends Object
A configuration object is used when creating a new IOFactory. One configuration object can be used for
the creation of multiple factories as each new factory holds its own copy of the configuration object. So the
configuration object can be changed after creating a factory with it without affecting the configuration of the
factory.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Configuration.Defaults
Set of default configuration values.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Configuration()
Constructs a new
Configuration. |
protected |
Configuration(Configuration<R,E> other)
Constructs a new
Configuration as a copy of the given one. |
| Modifier and Type | Method and Description |
|---|---|
abstract Configuration<R,E> |
createCopy()
Creates a copy of this
Configuration. |
protected abstract R |
createDefaultTypeMappingRegistry()
Creates the default type mapping registry to be used if none is explicitly given.
|
Collection<E> |
getEntryPoints()
Returns the entry points.
|
ObjectAccessorProvider |
getObjectAccessorProvider()
Returns the object accessor provider.
|
SimpleTypeConverterProvider |
getSimpleTypeConverterProvider()
Returns the simple type converter provider.
|
R |
getTypeMappingRegistry()
Returns the type mapping registry.
|
ValidationMode |
getValidationMode()
Returns the validation mode.
|
ValidatorProvider |
getValidatorProvider()
Returns the validator provider.
|
void |
setEntryPoints(Collection<E> entryPoints)
Sets the entry points.
|
void |
setObjectAccessorProvider(ObjectAccessorProvider objectAccessorProvider)
Sets the
ObjectAccessorProvider. |
void |
setSimpleTypeConverterProvider(SimpleTypeConverterProvider simpleTypeConverterProvider)
Sets the
SimpleTypeConverterProvider. |
void |
setTypeMappingRegistry(R typeMappingRegistry)
Sets the type mapping registry.
|
void |
setValidationMode(ValidationMode validationMode)
Sets the validation mode.
|
void |
setValidatorProvider(ValidatorProvider validatorProvider)
Sets the
ValidatorProvider. |
protected Configuration()
Configuration.protected Configuration(Configuration<R,E> other)
Configuration as a copy of the given one.other - the other configpublic final R getTypeMappingRegistry()
public final void setTypeMappingRegistry(R typeMappingRegistry)
typeMappingRegistry - a type mapping registrypublic final Collection<E> getEntryPoints()
Serializer.write(java.lang.Object) or which should be returned from Deserializer.next() and only for these
objects (not for the objects related to these ones). If more than one entry point is defined for the same
data type name, then public final void setEntryPoints(Collection<E> entryPoints)
entryPoints - the entry pointspublic final ObjectAccessorProvider getObjectAccessorProvider()
public final SimpleTypeConverterProvider getSimpleTypeConverterProvider()
public final ValidatorProvider getValidatorProvider()
public final ValidationMode getValidationMode()
public final void setObjectAccessorProvider(ObjectAccessorProvider objectAccessorProvider)
ObjectAccessorProvider.objectAccessorProvider - the ObjectAccessorProviderpublic final void setSimpleTypeConverterProvider(SimpleTypeConverterProvider simpleTypeConverterProvider)
SimpleTypeConverterProvider.simpleTypeConverterProvider - the SimpleTypeConverterProviderpublic final void setValidatorProvider(ValidatorProvider validatorProvider)
ValidatorProvider.validatorProvider - the ValidatorProviderpublic final void setValidationMode(ValidationMode validationMode)
validationMode - the validation modepublic abstract Configuration<R,E> createCopy()
Configuration.Configurationprotected abstract R createDefaultTypeMappingRegistry()
Copyright © 2014. All rights reserved.