com.googlecode.mobilityrpc.protocol.converters
Class MessageConverter<T>
java.lang.Object
com.googlecode.mobilityrpc.protocol.converters.MessageConverter<T>
- Direct Known Subclasses:
- EnvelopeMessageConverter, ExecutionRequestMessageConverter, ExecutionResponseMessageConverter, MasterMessageConverter, PingMessageConverter, PongMessageConverter, ResourceRequestMessageConverter, ResourceResponseMessageConverter
public abstract class MessageConverter<T>
- extends Object
Interface implemented by classes which can convert Java object (POJO) representations of messages to/from binary
using protobuf.
- Author:
- Niall Gallagher
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageConverter
public MessageConverter()
convertFromProtobuf
public final T convertFromProtobuf(byte[] bytes)
convertToProtobuf
public final byte[] convertToProtobuf(T object)
fromProtobuf
protected abstract T fromProtobuf(byte[] bytes)
throws Exception
- Throws:
Exception
toProtobuf
protected abstract byte[] toProtobuf(T object)
throws Exception
- Throws:
Exception
Copyright © 2012. All Rights Reserved.