public abstract class SpinValueSerializer extends AbstractSerializableValueSerializer<SpinValue>
Modifier and Type | Field and Description |
---|---|
protected org.camunda.spin.spi.DataFormat<?> |
dataFormat |
protected String |
name |
serializationDataFormat
BINARY_VALUE_TYPES, valueType
Constructor and Description |
---|
SpinValueSerializer(SerializableValueType type,
org.camunda.spin.spi.DataFormat<?> dataFormat,
String name) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canSerializeValue(Object value)
return true if this serializer is able to serialize the provided object.
|
protected Object |
deserializeFromByteArray(byte[] object,
ValueFields valueFields)
Deserialize the object from a byte array.
|
String |
getName()
The name of this serializer.
|
protected boolean |
isSerializationTextBased()
Return true if the serialization is text based.
|
protected byte[] |
serializeToByteArray(Object deserializedObject)
Implementations must return a byte[] representation of the provided object.
|
protected void |
updateTypedValue(SpinValue value,
String serializedStringValue) |
protected void |
writeToValueFields(SpinValue value,
ValueFields valueFields,
byte[] serializedValue) |
canWriteValue, createDeserializedValue, createSerializedValue, getSerializationDataformat, getSerializedBytesValue, getSerializedStringValue, readSerializedValueFromFields, readValue, writeValue
canHandle, getType, isMutableValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertToTypedValue
protected org.camunda.spin.spi.DataFormat<?> dataFormat
protected String name
public SpinValueSerializer(SerializableValueType type, org.camunda.spin.spi.DataFormat<?> dataFormat, String name)
public String getName()
TypedValueSerializer
protected void writeToValueFields(SpinValue value, ValueFields valueFields, byte[] serializedValue)
writeToValueFields
in class AbstractSerializableValueSerializer<SpinValue>
protected void updateTypedValue(SpinValue value, String serializedStringValue)
updateTypedValue
in class AbstractSerializableValueSerializer<SpinValue>
protected boolean canSerializeValue(Object value)
AbstractSerializableValueSerializer
canSerializeValue
in class AbstractSerializableValueSerializer<SpinValue>
value
- the object to test (guaranteed to be a non-null value)protected byte[] serializeToByteArray(Object deserializedObject) throws Exception
AbstractSerializableValueSerializer
serializeToByteArray
in class AbstractSerializableValueSerializer<SpinValue>
deserializedObject
- the object to serializeException
protected Object deserializeFromByteArray(byte[] object, ValueFields valueFields) throws Exception
AbstractSerializableValueSerializer
deserializeFromByteArray
in class AbstractSerializableValueSerializer<SpinValue>
object
- the object to deserializevalueFields
- the value fieldsException
protected boolean isSerializationTextBased()
AbstractSerializableValueSerializer
isSerializationTextBased
in class AbstractSerializableValueSerializer<SpinValue>
Copyright © 2021. All rights reserved.