Class DataMapper.MappingConsumer<T>
java.lang.Object
de.iip_ecosphere.platform.services.environment.DataMapper.MappingConsumer<T>
- Type Parameters:
T- the mapped type
- All Implemented Interfaces:
Consumer<T>
- Direct Known Subclasses:
DataMapper.BaseMappingConsumer
- Enclosing class:
DataMapper
Provides a default consumer implementation for
DataMapper.mapJsonData(InputStream, Class, Consumer)
which maps attribute values to registered consumers.- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMappingConsumer(Class<T> cls) Creates a mapping consumer for the givenclstype. -
Method Summary
Modifier and TypeMethodDescriptionvoid<A> voidaddHandler(Class<A> cls, Consumer<A> cons) Adds a handler forclsbased on the consumercons.
-
Field Details
-
mapping
-
-
Constructor Details
-
MappingConsumer
Creates a mapping consumer for the givenclstype.- Parameters:
cls- the class to do the mapping for
-
-
Method Details
-
addHandler
Adds a handler forclsbased on the consumercons.- Type Parameters:
A- the data type to be handled- Parameters:
cls- the class to handle (may be null, then this call is ignored)cons- the corresponding consumer (may be null, then this call is ignored)
-
accept
-