T - The type of object contained in the serialized objectpublic class LazyDeserializingObject<T> extends Object
| Constructor and Description | 
|---|
LazyDeserializingObject(SerializedObject<?> serializedObject,
                       Serializer serializer)
Creates an instance which will deserialize given  
serializedObject upon request. | 
LazyDeserializingObject(Supplier<SerializedObject<?>> serializedObjectSupplier,
                       SerializedType serializedType,
                       Serializer serializer)
Creates an instance which will get the supplied SerializedObject and deserialize it upon request. 
 | 
LazyDeserializingObject(T deserializedObject)
Creates an instance with the given  
deserializedObject object instance. | 
| Modifier and Type | Method and Description | 
|---|---|
T | 
getObject()
De-serializes the object and returns the result. 
 | 
SerializedObject<?> | 
getSerializedObject()
Returns the serialized object to deserialize upon request 
 | 
Serializer | 
getSerializer()
Returns the serializer to deserialize this object 
 | 
Class<T> | 
getType()
Returns the class of the serialized object. 
 | 
boolean | 
isDeserialized()
Indicates whether this object has already been deserialized. 
 | 
public LazyDeserializingObject(T deserializedObject)
deserializedObject object instance. Using this constructor will
 ensure that no deserializing is required when invoking the getType() or getObject() methods.deserializedObject - The deserialized object to return on getObject()public LazyDeserializingObject(SerializedObject<?> serializedObject, Serializer serializer)
serializedObject upon request. Use this constructor
 if the serializedObject is already available and does not need to undergo a process of e.g.
 upcasting.serializedObject - The serialized payload of the messageserializer - The serializer to deserialize the payload data withUnknownSerializedTypeException - if the type of the serialized object cannot be resolved to a classpublic LazyDeserializingObject(Supplier<SerializedObject<?>> serializedObjectSupplier, SerializedType serializedType, Serializer serializer)
serializedObjectSupplier - The supplier of the serialized objectserializedType - The type of the serialized objectserializer - The serializer to deserialize the payload data withUnknownSerializedTypeException - if the type of the serialized object cannot be resolved to a classpublic Class<T> getType()
public T getObject()
public boolean isDeserialized()
true, the
 getObject() method is able to return a value without invoking the serializer.public Serializer getSerializer()
public SerializedObject<?> getSerializedObject()
Copyright © 2010–2018. All rights reserved.