Class JavaObjectSerializer
- java.lang.Object
- 
- org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer<T>
- 
- org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializer<ObjectValue>
- 
- org.camunda.bpm.engine.impl.variable.serializer.AbstractObjectValueSerializer
- 
- org.camunda.bpm.engine.impl.variable.serializer.JavaObjectSerializer
 
 
 
 
- 
- All Implemented Interfaces:
- TypedValueSerializer<ObjectValue>
 
 public class JavaObjectSerializer extends AbstractObjectValueSerializer Uses default java serialization to serialize java objects as byte streams.- Author:
- Daniel Meyer, Tom Baeyens
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classJavaObjectSerializer.ClassloaderAwareObjectInputStream
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringNAME- 
Fields inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializerserializationDataFormat
 - 
Fields inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializerBINARY_VALUE_TYPES, valueType
 
- 
 - 
Constructor SummaryConstructors Constructor Description JavaObjectSerializer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanSerializeValue(java.lang.Object value)return true if this serializer is able to serialize the provided object.protected java.lang.ObjectdeserializeFromByteArray(byte[] bytes, java.lang.String objectTypeName)Deserialize the object from a byte array.java.lang.StringgetName()The name of this serializer.protected java.lang.StringgetTypeNameForDeserialized(java.lang.Object deserializedObject)Returns the type name for the deserialized object.protected booleanisSerializationTextBased()Return true if the serialization is text based.protected byte[]serializeToByteArray(java.lang.Object deserializedObject)Implementations must return a byte[] representation of the provided object.- 
Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractObjectValueSerializerconvertToTypedValue, createDeserializedValue, createSerializedValue, deserializeFromByteArray, getObjectTypeName, isMutableValue, readObjectNameFromFields, updateTypedValue, writeToValueFields
 - 
Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializercanWriteValue, getSerializationDataformat, getSerializedBytesValue, getSerializedStringValue, readSerializedValueFromFields, readValue, writeValue
 - 
Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializercanHandle, getType
 
- 
 
- 
- 
- 
Field Detail- 
NAMEpublic static final java.lang.String NAME - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Description copied from interface:TypedValueSerializerThe name of this serializer. The name is used when persisting the ValueFields populated by this serializer.- Returns:
- the name of this serializer.
 
 - 
isSerializationTextBasedprotected boolean isSerializationTextBased() Description copied from class:AbstractObjectValueSerializerReturn true if the serialization is text based. Return false otherwise- Specified by:
- isSerializationTextBasedin class- AbstractObjectValueSerializer
 
 - 
deserializeFromByteArrayprotected java.lang.Object deserializeFromByteArray(byte[] bytes, java.lang.String objectTypeName) throws java.lang.ExceptionDescription copied from class:AbstractObjectValueSerializerDeserialize the object from a byte array.- Specified by:
- deserializeFromByteArrayin class- AbstractObjectValueSerializer
- Parameters:
- bytes- the object to deserialize
- objectTypeName- the type name of the object to deserialize
- Returns:
- the deserialized object
- Throws:
- java.lang.Exception
 
 - 
serializeToByteArrayprotected byte[] serializeToByteArray(java.lang.Object deserializedObject) throws java.lang.ExceptionDescription copied from class:AbstractObjectValueSerializerImplementations must return a byte[] representation of the provided object. The object is guaranteed not to be null.- Specified by:
- serializeToByteArrayin class- AbstractObjectValueSerializer
- Parameters:
- deserializedObject- the object to serialize
- Returns:
- the byte array value of the object
- Throws:
- java.lang.Exception
 
 - 
getTypeNameForDeserializedprotected java.lang.String getTypeNameForDeserialized(java.lang.Object deserializedObject) Description copied from class:AbstractObjectValueSerializerReturns the type name for the deserialized object.- Specified by:
- getTypeNameForDeserializedin class- AbstractObjectValueSerializer
- Parameters:
- deserializedObject- . Guaranteed not to be null
- Returns:
- the type name fot the object.
 
 - 
canSerializeValueprotected boolean canSerializeValue(java.lang.Object value) Description copied from class:AbstractSerializableValueSerializerreturn true if this serializer is able to serialize the provided object.- Specified by:
- canSerializeValuein class- AbstractSerializableValueSerializer<ObjectValue>
- Parameters:
- value- the object to test (guaranteed to be a non-null value)
- Returns:
- true if the serializer can handle the object.
 
 
- 
 
-