Class FlowSerializer<T>
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<Consumer<T>>
com.norconex.commons.lang.flow.module.FlowSerializer<T>
- Type Parameters:
T- type type of object being serialized
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable,com.fasterxml.jackson.databind.ser.ContextualSerializer,com.fasterxml.jackson.databind.ser.ResolvableSerializer
public class FlowSerializer<T>
extends com.fasterxml.jackson.databind.JsonSerializer<Consumer<T>>
implements com.fasterxml.jackson.databind.ser.ContextualSerializer, com.fasterxml.jackson.databind.ser.ResolvableSerializer
Flow serializer.
- Since:
- 3.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None -
Constructor Summary
ConstructorsConstructorDescriptionFlowSerializer(FlowMapperConfig config, com.fasterxml.jackson.databind.JsonSerializer<?> defaultSerializer) -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, com.fasterxml.jackson.databind.BeanProperty property) voidresolve(com.fasterxml.jackson.databind.SerializerProvider provider) voidserialize(Consumer<T> value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider sp) Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
-
Constructor Details
-
FlowSerializer
public FlowSerializer(FlowMapperConfig config, com.fasterxml.jackson.databind.JsonSerializer<?> defaultSerializer)
-
-
Method Details
-
serialize
public void serialize(Consumer<T> value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider sp) throws IOException - Specified by:
serializein classcom.fasterxml.jackson.databind.JsonSerializer<Consumer<T>>- Throws:
IOException
-
createContextual
public com.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException - Specified by:
createContextualin interfacecom.fasterxml.jackson.databind.ser.ContextualSerializer- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-
resolve
public void resolve(com.fasterxml.jackson.databind.SerializerProvider provider) throws com.fasterxml.jackson.databind.JsonMappingException - Specified by:
resolvein interfacecom.fasterxml.jackson.databind.ser.ResolvableSerializer- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-