Package dev.getelements.elements.rt.fst
Class FSTPayloadReader
java.lang.Object
dev.getelements.elements.rt.fst.FSTPayloadReader
- All Implemented Interfaces:
PayloadReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TReads the object to another type.org.nustaq.serialization.FSTConfigurationstatic void<T> TReads a payload from the supplied byte array.<T> Tread(Class<T> payloadType, InputStream stream) Reads the actual response object to theInputStream.voidsetFstConfiguration(org.nustaq.serialization.FSTConfiguration fstConfiguration)
-
Constructor Details
-
FSTPayloadReader
public FSTPayloadReader()
-
-
Method Details
-
convert
Description copied from interface:PayloadReaderReads the object to another type.- Specified by:
convertin interfacePayloadReader- Type Parameters:
T- the type- Parameters:
to- the type to readfrom- the type from which to read- Returns:
- an instance of the requested type, read from the supplied object.
-
read
Description copied from interface:PayloadReaderReads the actual response object to theInputStream.- Specified by:
readin interfacePayloadReader- Parameters:
payloadType- the the response objectstream- the output stream- Throws:
IOException
-
read
Description copied from interface:PayloadReaderReads a payload from the supplied byte array. The default implementation of this method uses a temporaryByteArrayInputStreamto accomplish the deserialization.- Specified by:
readin interfacePayloadReader- Type Parameters:
T- the type of the payload- Parameters:
payloadType- the type of the payloadtoRead- the byte array to read- Returns:
- the deserialized payload
- Throws:
IOException
-
getFstConfiguration
public org.nustaq.serialization.FSTConfiguration getFstConfiguration() -
setFstConfiguration
@Inject public void setFstConfiguration(org.nustaq.serialization.FSTConfiguration fstConfiguration) -
main
- Throws:
Exception
-