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