com.googlecode.mobilityrpc.protocol.converters
Class MasterMessageConverter

java.lang.Object
  extended by com.googlecode.mobilityrpc.protocol.converters.MessageConverter<Object>
      extended by com.googlecode.mobilityrpc.protocol.converters.MasterMessageConverter

public class MasterMessageConverter
extends MessageConverter<Object>

A "master converter" which can convert any message object to/from protobuf and wrap/unwrap in an envelope automatically.

Delegates to other MessageConverter implementations depending on the type of message supplied, via MessageTypeRegistry and MessageConverterRegistry.

Author:
Niall Gallagher

Constructor Summary
MasterMessageConverter()
           
 
Method Summary
protected  Object fromProtobuf(byte[] bytes)
           
protected  byte[] toProtobuf(Object object)
           
 
Methods inherited from class com.googlecode.mobilityrpc.protocol.converters.MessageConverter
convertFromProtobuf, convertToProtobuf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterMessageConverter

public MasterMessageConverter()
Method Detail

fromProtobuf

protected Object fromProtobuf(byte[] bytes)
                       throws Exception
Specified by:
fromProtobuf in class MessageConverter<Object>
Throws:
Exception

toProtobuf

protected byte[] toProtobuf(Object object)
                     throws Exception
Specified by:
toProtobuf in class MessageConverter<Object>
Throws:
Exception


Copyright © 2012. All Rights Reserved.