Class ObjectSerializers
java.lang.Object
com.inductiveautomation.ignition.common.rpc.proto.ObjectSerializers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ObjectSerializers.UnsafeObjectProtoSerializer<Object>
DO NOT USE UNLESS LAST RESORT!
This uses default java serialization. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ObjectSerializers.SaferObjectProtoSerializer<T>
forSafeObject
(Class<T> targetClass, Class<?>... safeClasses) Creates a newObjectSerializers.SaferObjectProtoSerializer
for the given class.static <T> ObjectSerializers.UnsafeObjectProtoSerializer<T>
forUnsafeObject
(Class<T> clazz) DO NOT USE UNLESS LAST RESORT!
This uses default java serialization.
-
Field Details
-
UNSAFE_OBJECT
DO NOT USE UNLESS LAST RESORT!
This uses default java serialization. the only time this should ever be done is if we have basically no way to know what the object is or is going to be so we have no other choice. TheforSafeObject(Class, Class[])
variation should be used whenever possible (which means we have already given up on using GSON or protobuf defs due to technical limitations).
NOTE: This serialization mechanism still uses theObjectInputFilter
which helps prevent typical deserialization attacks.
-
-
Method Details
-
forSafeObject
public static <T> ObjectSerializers.SaferObjectProtoSerializer<T> forSafeObject(Class<T> targetClass, Class<?>... safeClasses) Creates a newObjectSerializers.SaferObjectProtoSerializer
for the given class. This will use theSaferObjectInputStream
and seed it with the default values along with the target class and any additionally provided classes. All other objects will cause deserialization failure -
forUnsafeObject
DO NOT USE UNLESS LAST RESORT!
This uses default java serialization. the only time this should ever be done is if we have basically no way to know what the object is or is going to be so we have no other choice.
NOTE: This serialization mechanism still uses theObjectInputFilter
which helps prevent typical deserialization attacks.
-