<commit_before># egova_invoker

˵ã
	HttpInvoker.invoker InvokerProcess
	
ͻ˵ã
	ProxyFactory.proxy ɽӿڵĴֱӵ÷
	
ͻ˺ͷ˵ĽӿںʵҪһ£ʵǿл<commit_msg>新增demo<commit_after># egova_invoker

服务器端调用：
	HttpInvoker.invoker 方法，设置InvokerProcess处理
	
客户端调用：
	ProxyFactory.proxy 方法，生成接口的代理对象，直接调用方法
	
客户端和服务器端的接口和实体类要一致，实体类必须是可以序列化的

比如：
	定义Bean：
		import java.io.Serializable;

		public class DemoBean implements Serializable{
		
			/**
			 * 
			 */
			private static final long serialVersionUID = -5401380996187961689L;
		
			private String name;
			
			private String passWork;
			
			//省略get,set
		}
	定义接口:
		
		public interface DemoService {
		
			public Object doTest(DemoBean bean);
			
		}
		
	客户端调用:
		import com.egova.rpc.proxy.ProxyFactory;

		public class ClientDemo {
			public static void main(String[] args) {
				String bindUrl = "服务器端请求地址/egova_invoker/invoker";
				DemoService demoService = ProxyFactory.proxy(DemoService.class, bindUrl);
				DemoBean  demo = new DemoBean();
				DemoBean  value = demoService.doTest(demo);
				System.out.println(value);
			}
		}
		
	服务端处理:
		import javax.servlet.http.HttpServletRequest;
		import javax.servlet.http.HttpServletResponse;
		
		import org.springframework.stereotype.Controller;
		import org.springframework.web.bind.annotation.RequestMapping;
		
		import com.egova.rpc.remote.HttpInvoker;
		import com.egova.rpc.remote.InvokerProcess;
		import com.egova.rpc.support.RemoteInvocation;
		
		@Controller
		@RequestMapping(value="/egova_invoker")
		public class ServerDemo{
			
			@RequestMapping(value="invoker")
			public void invoker(HttpServletRequest request, HttpServletResponse  response) {
				HttpInvoker.invoker(request, response, new InvokerProcess(){
					public Object process(RemoteInvocation invocation){
						//获取targetObject,即接口invocation.getInterfaceClazz()实现类
						Object targetObject = new Object();
						invocation.invoke(targetObject);
					}
				});
			}
		}


{'fraction_non_alphanumeric': 0.09157127991675339, 'fraction_numerical': 0.009885535900104058, 'mean_word_length': 3.8807106598984773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4834031', 'n_tokens_mistral': 844, 'n_tokens_neox': 722, 'n_words': 114}