@@ -0,0 +1,1556 @@
+package com.wangyin.ak47.example;%0A%0A%0Aimport com.wangyin.ak47.common.Logger;%0Aimport com.wangyin.ak47.core.Request;%0Aimport com.wangyin.ak47.core.Response;%0Aimport com.wangyin.ak47.core.Service;%0Aimport com.wangyin.ak47.core.stub.SimpleStub;%0Aimport com.wangyin.ak47.pipes.http.SimpleHttpPipe;%0Aimport com.wangyin.ak47.pipes.http.SimpleHttpRequest;%0Aimport com.wangyin.ak47.pipes.http.SimpleHttpResponse;%0A%0A%0Apublic class SimpleHttpStubExample %7B%0A    private static final Logger log = new Logger(SimpleHttpStubExample.class);%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        %0A        // new a Pipe%0A        SimpleHttpPipe pipe = new SimpleHttpPipe();%0A        %0A        SimpleStub%3CSimpleHttpRequest, SimpleHttpResponse%3E stub = pipe.createSimpleStub(8055);%0A        %0A        stub.addService(%22myservice%22, new Service%3CSimpleHttpRequest, SimpleHttpResponse%3E()%7B%0A%0A            @Override%0A            public void doService(Request%3CSimpleHttpRequest%3E request,%0A                    Response%3CSimpleHttpResponse%3E response) throws Exception %7B%0A                SimpleHttpRequest httpreq = request.pojo();%0A                log.info(%22Got a request, url is %7B%7D.%22, httpreq.getUrl());%0A                %0A                SimpleHttpResponse httpres = new SimpleHttpResponse();%0A                String content = %22Your request url is %22+httpreq.getUrl();%0A                httpres.setContent(content.getBytes());%0A                %0A                response.pojo(httpres);%0A            %7D%0A%0A            %0A        %7D);%0A        %0A        stub.start();%0A        stub.hold();%0A    %7D%0A%0A%7D%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A

add SimpleHttpStubExample