Class ThrowableConverter
- java.lang.Object
-
- com.oracle.coherence.io.json.internal.ThrowableConverter
-
- All Implemented Interfaces:
Converter<Throwable>,Deserializer<Throwable>,Serializer<Throwable>
public class ThrowableConverter extends Object implements Converter<Throwable>
- Since:
- 20.06
- Author:
- Jonathan Knight 2018.11.28
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classThrowableConverter.FactoryAFactoryfor creating instances ofThrowableConverter.
-
Field Summary
Fields Modifier and Type Field Description static ThrowableConverterINSTANCEA singletonThrowableConverterinstance.
-
Constructor Summary
Constructors Modifier Constructor Description protectedThrowableConverter()Creates a newThrowableConverter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwabledeserialize(ObjectReader in, Context context)voidserialize(Throwable throwable, ObjectWriter writer, Context context)
-
-
-
Field Detail
-
INSTANCE
public static final ThrowableConverter INSTANCE
A singletonThrowableConverterinstance.
-
-
Method Detail
-
serialize
public void serialize(Throwable throwable, ObjectWriter writer, Context context) throws Exception
- Specified by:
serializein interfaceConverter<Throwable>- Specified by:
serializein interfaceSerializer<Throwable>- Parameters:
throwable- we want to serialize. The object is of type T or a subclass (if this serializer has been registered for subclasses).writer- to use to write data to the output stream.context- the current context.- Throws:
JsonBindingExceptionJsonStreamExceptionException
-
deserialize
public Throwable deserialize(ObjectReader in, Context context) throws Exception
- Specified by:
deserializein interfaceConverter<Throwable>- Specified by:
deserializein interfaceDeserializer<Throwable>- Parameters:
in- used to read data from.context- the current context.- Returns:
- an instance of T or a subclass of T.
- Throws:
JsonBindingExceptionJsonStreamExceptionException
-
-