WireType
- wire type of contained converterspublic class DefaultConverterRepository<WireType> extends Object implements ConverterRepository<WireType>
ConverterRepository
implementation used as the default in RSB. The
accessor methods return ConverterSelectionStrategy
instances of type
UnambiguousConverterMap
. Adding a converter with the same signature
as an existing one will replace the previous entry.Constructor and Description |
---|
DefaultConverterRepository() |
Modifier and Type | Method and Description |
---|---|
void |
addConverter(Converter<WireType> converter)
Adds a new converter to the repository.
|
protected Map<ConverterSignature,Converter<WireType>> |
getConverterMap() |
ConverterSelectionStrategy<WireType> |
getConvertersForDeserialization()
This method queries the converter map for deseralizable data types and
returns an UnambiguousConverterMap for the chosen WireType to the
caller.
|
ConverterSelectionStrategy<WireType> |
getConvertersForSerialization()
This method queries the converter map for seralizable data types and
returns an UnambiguousConverterMap for the chosen WireType to the
caller.
|
static DefaultConverterRepository<ByteBuffer> |
getDefaultConverterRepository()
Returns a global repository for wire type
ByteBuffer . |
Collection<Converter<WireType>> |
getRegisteredConverters()
Returns all converters that are currently contained in this repository.
|
protected Map<ConverterSignature,Converter<WireType>> getConverterMap()
public ConverterSelectionStrategy<WireType> getConvertersForSerialization()
ConverterRepository
getConvertersForSerialization
in interface ConverterRepository<WireType>
public ConverterSelectionStrategy<WireType> getConvertersForDeserialization()
ConverterRepository
getConvertersForDeserialization
in interface ConverterRepository<WireType>
public void addConverter(Converter<WireType> converter)
ConverterRepository
addConverter
in interface ConverterRepository<WireType>
converter
- new converterpublic Collection<Converter<WireType>> getRegisteredConverters()
null
, might
be empty. Order has no significancepublic static DefaultConverterRepository<ByteBuffer> getDefaultConverterRepository()
ByteBuffer
.Copyright © 2018 CoR-Lab. All rights reserved.