A. thrift异步客户端怎么结束调用
首先创建thrift文件
namespace java thriftservice Hello{ string helloString(1:string para)}
执行thrift -gen Java test.thrift会生成一个Hello.java文件
将Hello.java文件拷贝至IDE
server端代码:
[java] view plain
[java] view plain
package com.thrift.test.thrift;
import org.apache.thrift.TProcessorFactory;
import org.apache.thrift.protocol.TCompactProtocol;
import org.apache.thrift.server.THsHaServer;
import org.apache.thrift.server.TServer;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TNonblockingServerSocket