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> T
Reads the object to another type.org.nustaq.serialization.FSTConfiguration
static void
<T> T
Reads a payload from the supplied byte array.<T> T
read
(Class<T> payloadType, InputStream stream) Reads the actual response object to theInputStream
.void
setFstConfiguration
(org.nustaq.serialization.FSTConfiguration fstConfiguration)
-
Constructor Details
-
FSTPayloadReader
public FSTPayloadReader()
-
-
Method Details
-
convert
Description copied from interface:PayloadReader
Reads the object to another type.- Specified by:
convert
in 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:PayloadReader
Reads the actual response object to theInputStream
.- Specified by:
read
in interfacePayloadReader
- Parameters:
payloadType
- the the response objectstream
- the output stream- Throws:
IOException
-
read
Description copied from interface:PayloadReader
Reads a payload from the supplied byte array. The default implementation of this method uses a temporaryByteArrayInputStream
to accomplish the deserialization.- Specified by:
read
in 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
-