package org.craft.atom.rpc;

import org.craft.atom.protocol.ProtocolDecoder;
import org.craft.atom.protocol.ProtocolEncoder;
import org.craft.atom.protocol.rpc.model.RpcMessage;
import org.craft.atom.rpc.spi.RpcProtocol;

/**
 * @author mindwind
 * @version 1.0, Aug 7, 2014
 */
public class DefaultRpcProtocol implements RpcProtocol {

	@Override
	public ProtocolEncoder<RpcMessage> getRpcEncoder() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ProtocolDecoder<RpcMessage> getRpcDecoder() {
		// TODO Auto-generated method stub
		return null;
	}

}

@@ -114,24 +114,80 @@
 colEncoder;%0A
+import org.craft.atom.protocol.rpc.api.RpcCodecFactory;%0A
 import org.c
@@ -227,16 +227,16 @@
 essage;%0A
-
 import o
@@ -384,16 +384,156 @@
 otocol %7B
+%0A%09%0A%09%0A%09private ProtocolEncoder%3CRpcMessage%3E encoder;%0A%09%0A%09%0A%09public DefaultRpcProtocol() %7B%0A%09%09this.encoder = RpcCodecFactory.newRpcEncoder();%0A%09%7D%0A%09
 %0A%0A%09@Over
@@ -595,45 +595,8 @@
 ) %7B%0A
-%09%09// TODO Auto-generated method stub%0A
 %09%09re
@@ -596,28 +596,31 @@
  %7B%0A%09%09return 
-null
+encoder
 ;%0A%09%7D%0A%0A%09@Over
@@ -684,56 +684,46 @@
 %7B%0A%09%09
-// TODO Auto-generated method stub%0A%09%09return null
+return RpcCodecFactory.newRpcDecoder()
 ;%0A%09%7D

improve - implement RpcProtocol