Interface ByteBufferMarshaller
- All Superinterfaces:
Marshallability,Marshaller<Object,ByteBuffer>
- All Known Implementing Classes:
AbstractByteBufferMarshaller,JavaByteBufferMarshaller,JBossByteBufferMarshaller,ProtoStreamByteBufferMarshaller,WrappedMessageByteBufferMarshaller
Marshals an object to and from a
ByteBuffer.- Author:
- Paul Ferraro
-
Field Summary
Fields inherited from interface org.wildfly.clustering.marshalling.Marshallability
TRUE -
Method Summary
Modifier and TypeMethodDescriptionReturns a provider of context to use during read/write operations.default Objectread(ByteBuffer buffer) Reads a value from its marshalled form.readFrom(InputStream input) Reads an object from the specified input stream.default OptionalIntReturns the marshalled size of the specified object.default ByteBufferWrites a value to its serialized formvoidwriteTo(OutputStream output, Object object) Writes the specified object to the specified output stream.Methods inherited from interface org.wildfly.clustering.marshalling.Marshallability
isMarshallable
-
Method Details
-
readFrom
Reads an object from the specified input stream.- Parameters:
input- an input stream- Returns:
- the unmarshalled object
- Throws:
IOException- if the object could not be read
-
writeTo
Writes the specified object to the specified output stream.- Parameters:
output- an output streamobject- an object to marshal- Throws:
IOException- if the object could not be written
-
read
Description copied from interface:MarshallerReads a value from its marshalled form.- Specified by:
readin interfaceMarshaller<Object,ByteBuffer> - Parameters:
buffer- the marshalled form- Returns:
- an unmarshalled value
- Throws:
IOException- if the value could not be read
-
write
Description copied from interface:MarshallerWrites a value to its serialized form- Specified by:
writein interfaceMarshaller<Object,ByteBuffer> - Parameters:
object- a value to marshal.- Returns:
- the serialized form of the value
- Throws:
IOException- if the value could not be written
-
size
Returns the marshalled size of the specified object.- Parameters:
object- the object whose marshalled size is to be computed- Returns:
- the marshalled size of the specified object.
-
getContextProvider
Returns a provider of context to use during read/write operations.- Returns:
- a context provider
-