C
- the configuration typeS
- the serializer typeD
- the deserializer typepublic abstract class RbfIOFactory<C extends Configuration<RbfTypeMappingRegistry,RbfEntryPoint>,S extends RbfSerializer,D extends RbfDeserializer> extends Object implements IOFactory
Instances of this class are immutable and thread-safe. This must be true for all subclasses, too.
Modifier | Constructor and Description |
---|---|
protected |
RbfIOFactory(C config)
Constructs a new
RbfIOFactory . |
Modifier and Type | Method and Description |
---|---|
D |
createDeserializer()
Creates a new
Deserializer . |
protected abstract D |
createDeserializer(C config,
Map<String,RbfEntryPoint> entryPointsByPrefix)
Creates a new A
Deserializer . |
protected abstract D |
createDeserializer(C config,
RbfEntryPoint entryPoint)
Creates a new
Deserializer . |
S |
createSerializer()
Creates a new
Serializer . |
protected abstract S |
createSerializer(C config,
Map<Class<?>,RbfEntryPoint> entryPointsByObjectType)
Creates a new
Serializer . |
protected boolean |
prefixRequired(Collection<RbfEntryPoint> entryPoints)
Returns true if and only if a prefix is required for the given entry points.
|
boolean |
withPrefixes()
Returns true if prefixes are used and false otherwise.
|
protected RbfIOFactory(C config)
RbfIOFactory
.config
- the configurationpublic final S createSerializer()
Serializer
.createSerializer
in interface IOFactory
Serializer
public final D createDeserializer()
Deserializer
.createDeserializer
in interface IOFactory
Deserializer
public boolean withPrefixes()
protected abstract S createSerializer(C config, Map<Class<?>,RbfEntryPoint> entryPointsByObjectType)
Serializer
.config
- the configurationentryPointsByObjectType
- a map from object types to entry points.Serializer
protected abstract D createDeserializer(C config, RbfEntryPoint entryPoint)
Deserializer
.config
- the configurationentryPoint
- the entry pointDeserializer
protected abstract D createDeserializer(C config, Map<String,RbfEntryPoint> entryPointsByPrefix)
Deserializer
.config
- the configurationentryPointsByPrefix
- a map from prefixes to entry pointsDeserializer
protected final boolean prefixRequired(Collection<RbfEntryPoint> entryPoints)
entryPoints
- the entry pointsCopyright © 2014. All rights reserved.