package com.wangyin.ak47.pipes.http;

import com.wangyin.ak47.core.Request;
import com.wangyin.ak47.core.Response;

/**
 * 简单实现
 * 
 * @author wyhubingyin
 * @date 2014年2月10日
 * 
 * @param <Q>
 * @param <R>
 */
public final class SimpleHttpPipe extends AbstractHttpPipe<SimpleHttpRequest, 
        SimpleHttpResponse>{
//    private static final Logger log = new Logger(SimpleHttpPipe.class);

    @Override
    public void decodeHttpRequest(SimpleHttpRequest httpReq, 
            Request<SimpleHttpRequest> request) 
            throws Exception{
        request.pojo(httpReq);
    }

    @Override
    public void encodeHttpRequest(Request<SimpleHttpRequest> request, 
            SimpleHttpRequest httpReq) 
            throws Exception {
        httpReq.copyOf(request.pojo());
    }

    @Override
    public void decodeHttpResponse(SimpleHttpResponse httpRes, 
            Response<SimpleHttpResponse> response) {
        response.pojo(httpRes);
    }

    @Override
    public void encodeHttpResponse(Response<SimpleHttpResponse> response, 
            SimpleHttpResponse httpRes) {
        httpRes.copyOf(response.pojo());
    }
    
    
}

@@ -155,56 +155,8 @@
 %0A * 
-@date 2014%E5%B9%B42%E6%9C%8810%E6%97%A5%0A * %0A * @param %3CQ%3E%0A * @param %3CR%3E
 %0A */

add more javadocs