public abstract class AbstractObjectValueSerializer extends AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
TypedValueSerializer
for ObjectValues
.serializationDataFormat
BINARY_VALUE_TYPES, valueType
Constructor and Description |
---|
AbstractObjectValueSerializer(String serializationDataFormat) |
Modifier and Type | Method and Description |
---|---|
org.camunda.bpm.engine.variable.value.ObjectValue |
convertToTypedValue(org.camunda.bpm.engine.variable.impl.value.UntypedValueImpl untypedValue)
Returns a typed value for the provided untyped value.
|
protected org.camunda.bpm.engine.variable.value.ObjectValue |
createDeserializedValue(Object deserializedObject,
String serializedStringValue,
ValueFields valueFields) |
protected org.camunda.bpm.engine.variable.value.ObjectValue |
createSerializedValue(String serializedStringValue,
ValueFields valueFields) |
protected abstract Object |
deserializeFromByteArray(byte[] object,
String objectTypeName)
Deserialize the object from a byte array.
|
protected Object |
deserializeFromByteArray(byte[] object,
ValueFields valueFields)
Deserialize the object from a byte array.
|
protected String |
getObjectTypeName(org.camunda.bpm.engine.variable.value.ObjectValue value,
ValueFields valueFields) |
protected abstract String |
getTypeNameForDeserialized(Object deserializedObject)
Returns the type name for the deserialized object.
|
boolean |
isMutableValue(org.camunda.bpm.engine.variable.value.ObjectValue typedValue) |
protected abstract boolean |
isSerializationTextBased()
Return true if the serialization is text based.
|
protected String |
readObjectNameFromFields(ValueFields valueFields) |
protected abstract byte[] |
serializeToByteArray(Object deserializedObject)
Implementations must return a byte[] representation of the provided object.
|
protected void |
updateTypedValue(org.camunda.bpm.engine.variable.value.ObjectValue value,
String serializedStringValue) |
protected void |
writeToValueFields(org.camunda.bpm.engine.variable.value.ObjectValue value,
ValueFields valueFields,
byte[] serializedValue) |
canSerializeValue, canWriteValue, getSerializationDataformat, getSerializedBytesValue, getSerializedStringValue, readSerializedValueFromFields, readValue, writeValue
canHandle, getType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public AbstractObjectValueSerializer(String serializationDataFormat)
public org.camunda.bpm.engine.variable.value.ObjectValue convertToTypedValue(org.camunda.bpm.engine.variable.impl.value.UntypedValueImpl untypedValue)
TypedValueSerializer
TypedValueSerializer
(by invocation of TypedValueSerializer.canHandle(TypedValue)
).untypedValue
- the untyped valueprotected void writeToValueFields(org.camunda.bpm.engine.variable.value.ObjectValue value, ValueFields valueFields, byte[] serializedValue)
writeToValueFields
in class AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
protected String getObjectTypeName(org.camunda.bpm.engine.variable.value.ObjectValue value, ValueFields valueFields)
protected void updateTypedValue(org.camunda.bpm.engine.variable.value.ObjectValue value, String serializedStringValue)
updateTypedValue
in class AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
protected org.camunda.bpm.engine.variable.value.ObjectValue createDeserializedValue(Object deserializedObject, String serializedStringValue, ValueFields valueFields)
createDeserializedValue
in class AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
protected org.camunda.bpm.engine.variable.value.ObjectValue createSerializedValue(String serializedStringValue, ValueFields valueFields)
createSerializedValue
in class AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
protected String readObjectNameFromFields(ValueFields valueFields)
public boolean isMutableValue(org.camunda.bpm.engine.variable.value.ObjectValue typedValue)
isMutableValue
in interface TypedValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
isMutableValue
in class AbstractTypedValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
protected abstract String getTypeNameForDeserialized(Object deserializedObject)
deserializedObject.
- Guaranteed not to be nullprotected abstract byte[] serializeToByteArray(Object deserializedObject) throws Exception
serializeToByteArray
in class AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
deserializedObject
- the object to serializeexception
- in case the object cannot be serializedException
protected Object deserializeFromByteArray(byte[] object, ValueFields valueFields) throws Exception
AbstractSerializableValueSerializer
deserializeFromByteArray
in class AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
object
- the object to deserializevalueFields
- the value fieldsException
protected abstract Object deserializeFromByteArray(byte[] object, String objectTypeName) throws Exception
object
- the object to deserializeobjectTypeName
- the type name of the object to deserializeexception
- in case the object cannot be deserializedException
protected abstract boolean isSerializationTextBased()
isSerializationTextBased
in class AbstractSerializableValueSerializer<org.camunda.bpm.engine.variable.value.ObjectValue>
Copyright © 2020. All rights reserved.