public interface IProtobufSerializer
| Modifier and Type | Method and Description |
|---|---|
Object |
fromProtobuf(com.google.protobuf.Message protoBuf,
Class<? extends Object> pojoClazz)
Implement the fromProtobuf method to set all ProtoBufAttributes
on the supplied POJO class.
|
com.google.protobuf.Message |
toProtobuf(Object pojo)
Implement the toProtobuf method that will convert this
object to a GeneratedMessage G.
|
com.google.protobuf.Message toProtobuf(Object pojo) throws ProtobufException
pojo - - POJO object to serialize into a Protobuf of generic type GProtobufExceptionObject fromProtobuf(com.google.protobuf.Message protoBuf, Class<? extends Object> pojoClazz) throws ProtobufException
protoBuf - - GeneratedMessage, the object to "deserialize" into a POJOpojoClazz - - Class type to "deserialize" toProtobufExceptionCopyright © 2014. All rights reserved.