我正在使用apache Thrift.我得到TTransportException异常,而everthing看起来很好用我的代码.这是我的Thrift服务器代码:
private TNonblockingServerSocket socket;
/**
* @breif Store processor instance.
*/
private PringService.Processor processor;
/**
* Store server instance.
*/
private TServer tServer;
/**
*
* @breif A handle to the unique Singleton instance.
*/
static private ThriftServer _instance = null;
/**
* @breif The unique instance of this class.
* @throws TTransportException
*/
static public ThriftServer getInstance() throws TTransportException {
if (null == _instance) {
_instance = new ThriftServer();
}
return _instance;
}
/**
* @breif A Ctor …Run Code Online (Sandbox Code Playgroud)