package com.sdw.soft.demo.dubbo.api.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.sdw.soft.demo.dubbo.api.IDubboService;

/**
 * @author shangyd
 * @date 2016年5月7日 下午4:53:40
 **/
@Service(version = "1.0.0")
public class DubboServiceImpl implements IDubboService {

	@Override
	public String sayHello(String message) {
		return "Dubbo say:" + message;
	}

}

@@ -103,243 +103,831 @@
 com.
-sdw.soft.demo.dubbo.api.IDubboService;%0A%0A/**%0A * @author shangyd%0A * @date 2016%E5%B9%B45%E6%9C%887%E6%97%A5 %E4%B8%8B%E5%8D%884:53:40%0A **/%0A@Service(version = %221.0.0%22)%0Apublic class DubboServiceImpl implements IDubboService %7B%0A%0A%09@Override%0A%09public String sayHello(String message) %7B
+alibaba.dubbo.rpc.RpcContext;%0Aimport com.google.common.base.Joiner;%0Aimport com.sdw.soft.demo.dubbo.api.IDubboService;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A/**%0A * @author shangyd%0A * @date 2016%E5%B9%B45%E6%9C%887%E6%97%A5 %E4%B8%8B%E5%8D%884:53:40%0A **/%0A@Service(version = %221.0.0%22)%0Apublic class DubboServiceImpl implements IDubboService %7B%0A%0A%09private static final Logger logger = LoggerFactory.getLogger(DubboServiceImpl.class);%0A%0A%09@Override%0A%09public String sayHello(String message) %7B%0A%09%09boolean isConsumerSide = RpcContext.getContext().isConsumerSide();%0A%09%09boolean isProviderSide = RpcContext.getContext().isProviderSide();%0A%09%09logger.info(Joiner.on(%22 %22).join(new Object%5B%5D%7B%22isProviderSize=%22,isProviderSide,%22isConsumerSide=%22,isConsumerSide%7D));%0A%09%09String clientIp = RpcContext.getContext().getRemoteHost();//%E8%8E%B7%E5%8F%96%E8%B0%83%E7%94%A8%E6%96%B9IP%0A%09%09logger.info(%22%E8%B0%83%E7%94%A8%E6%96%B9%E7%9A%84IP%E4%B8%BA:%7B%7D%22,clientIp);%0A
 %0A%09%09r

test for RpcContext