Interface ProtoStreamReader
-
- All Superinterfaces:
ProtoStreamOperation,org.infinispan.protostream.RawProtoStreamReader,org.infinispan.protostream.TagReader
- All Known Implementing Classes:
DefaultProtoStreamReader
public interface ProtoStreamReader extends ProtoStreamOperation, org.infinispan.protostream.TagReader
ATagReaderwith the additional ability to read an arbitrary embedded object.- Author:
- Paul Ferraro
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation
ProtoStreamOperation.Context
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default ProtoStreamOperation.ContextgetContext()default ObjectreadAny()Reads an object of an arbitrary type from this reader.default <T> TreadAny(Class<T> targetClass)Reads an object of an arbitrary type from this reader, cast to the specified type.default <E extends Enum<E>>
EreadEnum(Class<E> enumClass)Reads an num of the specified type from this reader.intreadFixed32()Deprecated.UseTagReader.readSFixed32()instead.longreadFixed64()Deprecated.UseTagReader.readSFixed64()instead.intreadInt32()Deprecated.UseTagReader.readUInt32()orTagReader.readSInt32()longreadInt64()Deprecated.UseTagReader.readUInt64()orTagReader.readSInt64()<T> TreadObject(Class<T> targetClass)Reads an object of the specified type from this reader.-
Methods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation
findMarshaller, getSerializationContext
-
-
-
-
Method Detail
-
getContext
default ProtoStreamOperation.Context getContext()
-
readAny
default Object readAny() throws IOException
Reads an object of an arbitrary type from this reader.- Returns:
- a supplier of the unmarshalled object
- Throws:
IOException- if the object could not be read with the associated marshaller.
-
readAny
default <T> T readAny(Class<T> targetClass) throws IOException
Reads an object of an arbitrary type from this reader, cast to the specified type.- Parameters:
the- expected type- Returns:
- a supplier of the unmarshalled object
- Throws:
IOException- if the object could not be read with the associated marshaller.
-
readObject
<T> T readObject(Class<T> targetClass) throws IOException
Reads an object of the specified type from this reader.- Type Parameters:
T- the type of the associated marshaller- Parameters:
targetClass- the class of the associated marshaller- Returns:
- the unmarshalled object
- Throws:
IOException- if no marshaller is associated with the specified class, or if the object could not be read with the associated marshaller.
-
readEnum
default <E extends Enum<E>> E readEnum(Class<E> enumClass) throws IOException
Reads an num of the specified type from this reader.- Type Parameters:
T- the type of the associated marshaller- Parameters:
targetClass- the class of the associated marshaller- Returns:
- the unmarshalled enum
- Throws:
IOException- if no marshaller is associated with the specified enum class, or if the enum could not be read with the associated marshaller.
-
readInt32
@Deprecated int readInt32() throws IOException
Deprecated.UseTagReader.readUInt32()orTagReader.readSInt32()Deprecated to discourage use.- Specified by:
readInt32in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readInt32in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readFixed32
@Deprecated int readFixed32() throws IOException
Deprecated.UseTagReader.readSFixed32()instead.Deprecated to discourage use.- Specified by:
readFixed32in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readFixed32in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readInt64
@Deprecated long readInt64() throws IOException
Deprecated.UseTagReader.readUInt64()orTagReader.readSInt64()Deprecated to discourage use.- Specified by:
readInt64in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readInt64in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readFixed64
@Deprecated long readFixed64() throws IOException
Deprecated.UseTagReader.readSFixed64()instead.Deprecated to discourage use.- Specified by:
readFixed64in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readFixed64in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
-