public static class DefaultMessagePackMapper.Builder extends Object implements MessagePackMapperBuilder
DefaultMessagePackMapper
Constructor and Description |
---|
Builder()
Basic constructor, initialized with an empty mapper
|
Builder(DefaultMessagePackMapper mapper)
Basic constructor, initialized with the specified mapper
|
Modifier and Type | Method and Description |
---|---|
DefaultMessagePackMapper |
build()
Build the mapper instance
|
DefaultMessagePackMapper.Builder |
withDefaultArrayValueConverter()
Configure the mapper with default
MP_ARRAY entity to List converter |
DefaultMessagePackMapper.Builder |
withDefaultCollectionObjectConverter()
Configure the mapper with default
Collection to MP_ARRAY entity converter |
DefaultMessagePackMapper.Builder |
withDefaultListObjectConverter()
Configure the mapper with default
List to MP_ARRAY entity converter |
DefaultMessagePackMapper.Builder |
withDefaultMapObjectConverter()
Configure the mapper with default
Map to MP_MAP entity converter |
DefaultMessagePackMapper.Builder |
withDefaultMapValueConverter()
Configure the mapper with default
MP_MAP entity to Map converter |
<V extends org.msgpack.value.Value,O> |
withObjectConverter(Class<O> objectClass,
Class<V> valueClass,
ObjectConverter<O,V> converter)
Configure the mapper with a specified MessagePack object-to-entity converter
|
<V extends org.msgpack.value.Value,O> |
withObjectConverter(Class<O> objectClass,
ObjectConverter<O,V> converter)
Configure the mapper with a specified MessagePack object-to-entity converter
|
<V extends org.msgpack.value.Value,O> |
withObjectConverter(ObjectConverter<O,V> converter)
Configure the mapper with a specified MessagePack object-to-entity converter
|
<V extends org.msgpack.value.Value,O> |
withValueConverter(org.msgpack.value.ValueType valueType,
Class<O> objectClass,
ValueConverter<V,O> converter)
Configure the mapper with a specified MessagePack entity-to-object converter
|
<V extends org.msgpack.value.Value,O> |
withValueConverter(org.msgpack.value.ValueType valueType,
ValueConverter<V,O> converter)
Configure the mapper with a specified MessagePack entity-to-object converter
|
public Builder()
public Builder(DefaultMessagePackMapper mapper)
mapper
- a mapper instancepublic DefaultMessagePackMapper.Builder withDefaultMapValueConverter()
MessagePackMapperBuilder
MP_MAP
entity to Map
converterwithDefaultMapValueConverter
in interface MessagePackMapperBuilder
public DefaultMessagePackMapper.Builder withDefaultMapObjectConverter()
MessagePackMapperBuilder
Map
to MP_MAP
entity converterwithDefaultMapObjectConverter
in interface MessagePackMapperBuilder
public DefaultMessagePackMapper.Builder withDefaultArrayValueConverter()
MessagePackMapperBuilder
MP_ARRAY
entity to List
converterwithDefaultArrayValueConverter
in interface MessagePackMapperBuilder
public DefaultMessagePackMapper.Builder withDefaultCollectionObjectConverter()
MessagePackMapperBuilder
Collection
to MP_ARRAY
entity converterwithDefaultCollectionObjectConverter
in interface MessagePackMapperBuilder
public DefaultMessagePackMapper.Builder withDefaultListObjectConverter()
MessagePackMapperBuilder
List
to MP_ARRAY
entity converterwithDefaultListObjectConverter
in interface MessagePackMapperBuilder
public <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withValueConverter(org.msgpack.value.ValueType valueType, ValueConverter<V,O> converter)
MessagePackMapperBuilder
withValueConverter
in interface MessagePackMapperBuilder
V
- MessagePack's entity type that the converter accepts and/or returnsO
- java object's type that the converter accepts and/or returnsvalueType
- MessagePack source typeconverter
- MessagePack entity-to-object and object-to-entity converterDefaultMessagePackMapper.registerValueConverter(ValueType, ValueConverter)
public <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withValueConverter(org.msgpack.value.ValueType valueType, Class<O> objectClass, ValueConverter<V,O> converter)
MessagePackMapperBuilder
withValueConverter
in interface MessagePackMapperBuilder
V
- MessagePack's entity type that the converter accepts and/or returnsO
- java object's type that the converter accepts and/or returnsvalueType
- MessagePack source typeobjectClass
- target object classconverter
- MessagePack entity-to-object and object-to-entity converterDefaultMessagePackMapper.registerValueConverter(ValueType, Class, ValueConverter)
public <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withObjectConverter(ObjectConverter<O,V> converter)
MessagePackMapperBuilder
withObjectConverter
in interface MessagePackMapperBuilder
V
- MessagePack's entity type that the converter accepts and/or returnsO
- java object's type that the converter accepts and/or returnsconverter
- MessagePack entity-to-object and object-to-entity converterpublic <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withObjectConverter(Class<O> objectClass, ObjectConverter<O,V> converter)
MessagePackMapperBuilder
withObjectConverter
in interface MessagePackMapperBuilder
V
- MessagePack's entity type that the converter accepts and/or returnsO
- java object's type that the converter accepts and/or returnsobjectClass
- source object classconverter
- MessagePack entity-to-object and object-to-entity converterpublic <V extends org.msgpack.value.Value,O> DefaultMessagePackMapper.Builder withObjectConverter(Class<O> objectClass, Class<V> valueClass, ObjectConverter<O,V> converter)
MessagePackMapperBuilder
withObjectConverter
in interface MessagePackMapperBuilder
V
- MessagePack entity typeO
- object typeobjectClass
- source object classvalueClass
- target object classconverter
- MessagePack entity-to-object and object-to-entity converterpublic DefaultMessagePackMapper build()
MessagePackMapperBuilder
build
in interface MessagePackMapperBuilder
Copyright © 2025 Picodata. All rights reserved.