Class PBMessageUnframedCodec<T extends MessageBuffer>
java.lang.Object
org.fusesource.hawtbuf.codec.VariableCodec<T>
org.fusesource.hawtbuf.proto.PBMessageUnframedCodec<T>
- All Implemented Interfaces:
Codec<T>
Implements the Codec interface for PBMessages type which encode/decodes unframed messages.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRead the payload of the object from the DataInput stream.voidencode(T value, DataOutput dataOut) Write the payload of the object to the DataOutput stream.intestimatedSize(T value) booleanbooleanMethods inherited from class VariableCodec
getFixedSize
-
Field Details
-
factory
-
-
Constructor Details
-
PBMessageUnframedCodec
-
-
Method Details
-
decode
Description copied from interface:CodecRead the payload of the object from the DataInput stream.- Parameters:
dataIn-- Returns:
- unmarshalled object
- Throws:
IOException
-
encode
Description copied from interface:CodecWrite the payload of the object to the DataOutput stream.- Parameters:
value-dataOut-- Throws:
IOException
-
isEstimatedSizeSupported
public boolean isEstimatedSizeSupported()- Specified by:
isEstimatedSizeSupportedin interfaceCodec<T extends MessageBuffer>- Overrides:
isEstimatedSizeSupportedin classVariableCodec<T extends MessageBuffer>- Returns:
- true if the
Codec.estimatedSize(Object)operation is supported.
-
estimatedSize
- Specified by:
estimatedSizein interfaceCodec<T extends MessageBuffer>- Overrides:
estimatedSizein classVariableCodec<T extends MessageBuffer>- Parameters:
value-- Returns:
- the estimated marshaled size of the object.
-
isDeepCopySupported
public boolean isDeepCopySupported()- Specified by:
isDeepCopySupportedin interfaceCodec<T extends MessageBuffer>- Overrides:
isDeepCopySupportedin classVariableCodec<T extends MessageBuffer>- Returns:
- true if the
Codec.deepCopy(Object)operations is supported.
-
deepCopy
- Specified by:
deepCopyin interfaceCodec<T extends MessageBuffer>- Overrides:
deepCopyin classVariableCodec<T extends MessageBuffer>- Returns:
- a deep copy of the source object. If the source is immutable the same source should be returned.
-