当前位置: 首页>>代码示例>>Java>>正文


Java TProcessor.process方法代码示例

本文整理汇总了Java中org.apache.thrift.TProcessor.process方法的典型用法代码示例。如果您正苦于以下问题:Java TProcessor.process方法的具体用法?Java TProcessor.process怎么用?Java TProcessor.process使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.thrift.TProcessor的用法示例。


在下文中一共展示了TProcessor.process方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: thriftRequest

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
private String thriftRequest(byte[] input){
    try{
    
        //Input
        TMemoryBuffer inbuffer = new TMemoryBuffer(input.length);           
        inbuffer.write(input);              
        TProtocol  inprotocol   = new TJSONProtocol(inbuffer);                   
        
        //Output
        TMemoryBuffer outbuffer = new TMemoryBuffer(100);           
        TProtocol outprotocol   = new TJSONProtocol(outbuffer);
        
        TProcessor processor = new Calculator.Processor(new CalculatorHandler());      
        processor.process(inprotocol, outprotocol);
        
        byte[] output = new byte[outbuffer.length()];
        outbuffer.readAll(output, 0, output.length);
    
        return new String(output,"UTF-8");
    }catch(Throwable t){
        return "Error:"+t.getMessage();
    }
     
             
}
 
开发者ID:YinYanfei,项目名称:CadalWorkspace,代码行数:26,代码来源:Httpd.java

示例2: thriftRequest

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
private String thriftRequest(byte[] input){
    try{
    
        //Input
        TMemoryBuffer inbuffer = new TMemoryBuffer(input.length);           
        inbuffer.write(input);              
        TProtocol  inprotocol   = new TJSONProtocol(inbuffer);                   
        
        //Output
        TMemoryBuffer outbuffer = new TMemoryBuffer(100);           
        TProtocol outprotocol   = new TJSONProtocol(outbuffer);
        
        TProcessor processor = new ThriftTest.Processor(new TestHandler());      
        processor.process(inprotocol, outprotocol);
        
        byte[] output = new byte[outbuffer.length()];
        outbuffer.readAll(output, 0, output.length);
    
        return new String(output,"UTF-8");
    }catch(Throwable t){
        return "Error:"+t.getMessage();
    }
     
             
}
 
开发者ID:YinYanfei,项目名称:CadalWorkspace,代码行数:26,代码来源:Httpd.java

示例3: handleRequest

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
@Override
public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	if (!"POST".equals(request.getMethod())) {
		throw new HttpRequestMethodNotSupportedException(request.getMethod(), new String[]{"POST"}, "ThriftServiceExporter only supports POST requests");
	}

	InputStream in = request.getInputStream();
	OutputStream out = response.getOutputStream();
	try {
		ThriftContextHolder.init();
		response.setContentType("application/x-thrift");
		TTransport transport = new TIOStreamTransport(in, out);

		TProtocol protocol = getProtocolFactory().getProtocol(transport);
		TProcessor processor = ThriftUtil.buildProcessor(getServiceInterface(), getProxyForService());
		processor.process(protocol, protocol);
	} catch (Throwable e) {
		response.setContentType("text/plain; charset=UTF-8");
		response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
		e.printStackTrace(new PrintWriter(out, true));
		if (LOGGER.isErrorEnabled()) {
			LOGGER.error("Thrift server direct error", e);
		}
	} finally {
		ThriftContextHolder.reset();
	}
}
 
开发者ID:funtl,项目名称:framework,代码行数:28,代码来源:ThriftServiceExporter.java

示例4: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
public void run() {
  TProcessor processor = null;
  TTransport inputTransport = null;
  TTransport outputTransport = null;
  TProtocol inputProtocol = null;
  TProtocol outputProtocol = null;
  try {
    processor = processorFactory_.getProcessor(client);
    inputTransport = inputTransportFactory_.getTransport(client);
    outputTransport = outputTransportFactory_.getTransport(client);
    inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
    outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
    // we check stopped_ first to make sure we're not supposed to be shutting
    // down. this is necessary for graceful shutdown.
    while (!stopped && processor.process(inputProtocol, outputProtocol)) {}
  } catch (TTransportException ttx) {
    // Assume the client died and continue silently
  } catch (TException tx) {
    LOG.error("Thrift error occurred during processing of message.", tx);
  } catch (Exception x) {
    LOG.error("Error occurred during processing of message.", x);
  }

  if (inputTransport != null) {
    inputTransport.close();
  }

  if (outputTransport != null) {
    outputTransport.close();
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:35,代码来源:TBoundedThreadPoolServer.java

示例5: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
public void run() {
  TProcessor processor = null;
  TTransport inputTransport = null;
  TTransport outputTransport = null;
  TProtocol inputProtocol = null;
  TProtocol outputProtocol = null;
  try {
    processor = processorFactory_.getProcessor(client_);
    inputTransport = inputTransportFactory_.getTransport(client_);
    outputTransport = outputTransportFactory_.getTransport(client_);
    inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
    outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
    // we check stopped_ first to make sure we're not supposed to be shutting
    // down. this is necessary for graceful shutdown.
    while (!stopped_ && processor.process(inputProtocol, outputProtocol)) {}
  } catch (TTransportException ttx) {
    // Assume the client died and continue silently
  } catch (TException tx) {
    LOG.error("Thrift error occurred during processing of message.", tx);
  } catch (Exception x) {
    LOG.error("Error occurred during processing of message.", x);
  }

  if (inputTransport != null) {
    inputTransport.close();
  }

  if (outputTransport != null) {
    outputTransport.close();
  }
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:35,代码来源:TFactoryBasedThreadPoolServer.java

示例6: handleRequest

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
@Override
public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    if (!"POST".equals(request.getMethod())) {
        throw new HttpRequestMethodNotSupportedException(request.getMethod(),
                new String[]{"POST"}, "ThriftServiceExporter only supports POST requests");
    }

    InputStream in = request.getInputStream();
    OutputStream out = response.getOutputStream();
    try {
        ThriftContextHolder.init();
        response.setContentType("application/x-thrift");
        TTransport transport = new TIOStreamTransport(in, out);

        TProtocol protocol = getProtocolFactory().getProtocol(transport);
        TProcessor processor = ThriftUtil.buildProcessor(getServiceInterface(), getProxyForService());
        processor.process(protocol, protocol);
    } catch (Throwable e) {
        response.setContentType("text/plain; charset=UTF-8");
        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        e.printStackTrace(new PrintWriter(out, true));
        if (LOGGER.isErrorEnabled()) {
            LOGGER.error("Thrift server direct error", e);
        }
    } finally {
        ThriftContextHolder.reset();
    }
}
 
开发者ID:superhj1987,项目名称:spring-remoting-thrift,代码行数:29,代码来源:ThriftServiceExporter.java

示例7: doPost

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
 *      response)
 */
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {

	TTransport inTransport = null;
	TTransport outTransport = null;

	try {
		response.setContentType("application/x-thrift");

		if (null != this.customHeaders) {
			for (Map.Entry<String, String> header : this.customHeaders) {
				response.addHeader(header.getKey(), header.getValue());
			}
		}
		InputStream in = request.getInputStream();
		OutputStream out = response.getOutputStream();

		TTransport transport = new TIOStreamTransport(in, out);
		inTransport = transport;
		outTransport = transport;

		TProtocol inProtocol = inProtocolFactory.getProtocol(inTransport);
		TProtocol outProtocol = outProtocolFactory.getProtocol(outTransport);

		final TProcessor processor = processorFactory.create(request);
		processor.process(inProtocol, outProtocol);
		out.flush();
	} catch (TException te) {
		throw new ServletException(te);
	}
}
 
开发者ID:mondo-project,项目名称:mondo-integration,代码行数:37,代码来源:RequestAwareThriftServlet.java

示例8: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
@Override
public void run() {
  TProcessor processor = null;
  TTransport inputTransport = null;
  TTransport outputTransport = null;
  TProtocol inputProtocol = null;
  TProtocol outputProtocol = null;
  try {
    processor = processorFactory_.getProcessor(client);
    inputTransport = inputTransportFactory_.getTransport(client);
    outputTransport = outputTransportFactory_.getTransport(client);
    inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
    outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
    // we check stopped_ first to make sure we're not supposed to be shutting
    // down. this is necessary for graceful shutdown.
    while (!stopped && processor.process(inputProtocol, outputProtocol)) {}
  } catch (TTransportException ttx) {
    // Assume the client died and continue silently
  } catch (TException tx) {
    LOG.error("Thrift error occurred during processing of message.", tx);
  } catch (Exception x) {
    LOG.error("Error occurred during processing of message.", x);
  }

  if (inputTransport != null) {
    inputTransport.close();
  }

  if (outputTransport != null) {
    outputTransport.close();
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:36,代码来源:TBoundedThreadPoolServer.java

示例9: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
public void run() {
  TProcessor processor = null;
  TTransport inputTransport = null;
  TTransport outputTransport = null;
  TProtocol inputProtocol = null;
  TProtocol outputProtocol = null;
  try {
    processor = processorFactory_.getProcessor(client_);
    inputTransport = inputTransportFactory_.getTransport(client_);
    outputTransport = outputTransportFactory_.getTransport(client_);
    inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
    outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
    // we check stopped_ first to make sure we're not supposed to be shutting
    // down. this is necessary for graceful shutdown.
    while (!stopped_ && processor.process(inputProtocol, outputProtocol)) {}
  } catch (TTransportException ttx) {
    // Assume the client died and continue silently
  } catch (TException tx) {
    LOGGER.error("Thrift error occurred during processing of message.", tx);
  } catch (Exception x) {
    LOGGER.error("Error occurred during processing of message.", x);
  }

  if (inputTransport != null) {
    inputTransport.close();
  }

  if (outputTransport != null) {
    outputTransport.close();
  }
}
 
开发者ID:YinYanfei,项目名称:CadalWorkspace,代码行数:35,代码来源:TThreadPoolServer.java

示例10: process

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
public boolean process( TProtocol in, TProtocol out ) throws TException {

        short magic = in.readI16();

        if ( magic != ThriftCodec.MAGIC ) {
            logger.error(
                    new StringBuilder( 24 )
                            .append( "Unsupported magic " )
                            .append( magic ).toString() );
            return false;
        }

        in.readI32();
        in.readI16();
        byte version = in.readByte();
        String serviceName = in.readString();
        long id = in.readI64();

        ByteArrayOutputStream bos = new ByteArrayOutputStream( 1024 );

        TIOStreamTransport transport = new TIOStreamTransport( bos );

        TProtocol protocol = protocolFactory.getProtocol( transport );

        TProcessor processor = processorMap.get( serviceName );

        if ( processor == null ) {
            logger.error(
                    new StringBuilder( 32 )
                            .append( "Could not find processor for service " )
                            .append( serviceName )
                            .toString() );
            return false;
        }

        // todo if exception
        boolean result = processor.process( in, protocol );

        ByteArrayOutputStream header = new ByteArrayOutputStream( 512 );

        TIOStreamTransport headerTransport = new TIOStreamTransport( header );

        TProtocol headerProtocol = protocolFactory.getProtocol( headerTransport );

        headerProtocol.writeI16( magic );
        headerProtocol.writeI32( Integer.MAX_VALUE );
        headerProtocol.writeI16( Short.MAX_VALUE );
        headerProtocol.writeByte( version );
        headerProtocol.writeString( serviceName );
        headerProtocol.writeI64( id );
        headerProtocol.getTransport().flush();

        out.writeI16( magic );
        out.writeI32( bos.size() + header.size() );
        out.writeI16( ( short ) ( 0xffff & header.size() ) );
        out.writeByte( version );
        out.writeString( serviceName );
        out.writeI64( id );

        out.getTransport().write( bos.toByteArray() );
        out.getTransport().flush();

        return result;

    }
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:66,代码来源:MultiServiceProcessor.java

示例11: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
@Override
public void run() {
  TProcessor processor = null;
  TTransport inputTransport = null;
  TTransport outputTransport = null;
  TProtocol inputProtocol = null;
  TProtocol outputProtocol = null;

  final TServerEventHandler eventHandler = getEventHandler();
  ServerContext connectionContext = null;

  final ConnectionListener listener = connListener;
  final TTransport client = this.client;
  Socket clientSocket = null;

  try {
    processor = processorFactory_.getProcessor(client);
    inputTransport = inputTransportFactory_.getTransport(client);
    outputTransport = outputTransportFactory_.getTransport(client);
    inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
    outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);

    if (eventHandler != null) {
      connectionContext = eventHandler.createContext(inputProtocol,
          outputProtocol);
    }
    // register with ConnectionListener
    if (listener != null) {
      if (client instanceof GfxdTSocket) {
        clientSocket = ((GfxdTSocket)client).getSocket();
      }
      else if (client instanceof TSocket) {
        clientSocket = ((TSocket)client).getSocket();
      }
      listener.connectionOpened(clientSocket, this.connectionNumber);
    }
    // we check stopped_ first to make sure we're not supposed to be
    // shutting down. this is necessary for graceful shutdown.
    while (true) {

      if (eventHandler != null) {
        eventHandler.processContext(connectionContext, inputTransport,
            outputTransport);
      }

      if (stopped || !processor.process(inputProtocol, outputProtocol)) {
        break;
      }
    }
  } catch (TTransportException tte) {
    // Assume the client died and continue silently
  } catch (TException te) {
    LOGGER.error("Thrift error occurred during processing of message.", te);
  } catch (Exception e) {
    LOGGER.error("Error occurred during processing of message.", e);
  }

  if (eventHandler != null) {
    eventHandler.deleteContext(connectionContext, inputProtocol,
        outputProtocol);
  }

  if (inputTransport != null) {
    inputTransport.close();
  }

  if (outputTransport != null) {
    outputTransport.close();
  }

  // deregister with ConnectionListener
  if (listener != null) {
    listener.connectionClosed(clientSocket, this.connectionNumber);
  }
}
 
开发者ID:gemxd,项目名称:gemfirexd-oss,代码行数:79,代码来源:GfxdThriftServerThreadPool.java

示例12: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
public void run()
{
    TProcessor processor = null;
    TTransport inputTransport = null;
    TTransport outputTransport = null;
    TProtocol inputProtocol = null;
    TProtocol outputProtocol = null;
    SocketAddress socket = null;
    try
    {
        socket = ((TCustomSocket) client_).getSocket().getRemoteSocketAddress();
        ThriftSessionManager.instance.setCurrentSocket(socket);
        processor = processorFactory_.getProcessor(client_);
        inputTransport = inputTransportFactory_.getTransport(client_);
        outputTransport = outputTransportFactory_.getTransport(client_);
        inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
        outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
        // we check stopped first to make sure we're not supposed to be shutting
        // down. this is necessary for graceful shutdown.  (but not sufficient,
        // since process() can take arbitrarily long waiting for client input.
        // See comments at the end of serve().)
        while (!stopped && processor.process(inputProtocol, outputProtocol))
        {
            inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
            outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
        }
    }
    catch (TTransportException ttx)
    {
        // Assume the client died and continue silently
        // Log at debug to allow debugging of "frame too large" errors (see CASSANDRA-3142).
        logger.debug("Thrift transport error occurred during processing of message.", ttx);
    }
    catch (TException tx)
    {
        logger.error("Thrift error occurred during processing of message.", tx);
    }
    catch (Exception e)
    {
        JVMStabilityInspector.inspectThrowable(e);
        logger.error("Error occurred during processing of message.", e);
    }
    finally
    {
        if (socket != null)
            ThriftSessionManager.instance.connectionComplete(socket);
        if (inputTransport != null)
            inputTransport.close();
        if (outputTransport != null)
            outputTransport.close();
        activeClients.decrementAndGet();
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:57,代码来源:CustomTThreadPoolServer.java

示例13: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
public void run()
{
    TProcessor processor = null;
    TTransport inputTransport = null;
    TTransport outputTransport = null;
    TProtocol inputProtocol = null;
    TProtocol outputProtocol = null;
    SocketAddress socket = null;
    try
    {
        socket = ((TCustomSocket) client_).getSocket().getRemoteSocketAddress();
        ThriftSessionManager.instance.setCurrentSocket(socket);
        processor = processorFactory_.getProcessor(client_);
        inputTransport = inputTransportFactory_.getTransport(client_);
        outputTransport = outputTransportFactory_.getTransport(client_);
        inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
        outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
        // we check stopped first to make sure we're not supposed to be shutting
        // down. this is necessary for graceful shutdown.  (but not sufficient,
        // since process() can take arbitrarily long waiting for client input.
        // See comments at the end of serve().)
        while (!stopped && processor.process(inputProtocol, outputProtocol))
        {
            inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
            outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
        }
    }
    catch (TTransportException ttx)
    {
        // Assume the client died and continue silently
        // Log at debug to allow debugging of "frame too large" errors (see CASSANDRA-3142).
        logger.debug("Thrift transport error occurred during processing of message.", ttx);
    }
    catch (TException tx)
    {
        logger.error("Thrift error occurred during processing of message.", tx);
    }
    catch (Exception x)
    {
        logger.error("Error occurred during processing of message.", x);
    }
    finally
    {
        activeClients.decrementAndGet();
        if (socket != null)
            ThriftSessionManager.instance.connectionComplete(socket);
    }

    if (inputTransport != null)
    {
        inputTransport.close();
    }

    if (outputTransport != null)
    {
        outputTransport.close();
    }
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:62,代码来源:CustomTThreadPoolServer.java

示例14: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
public void run()
{
    TProcessor processor = null;
    TProtocol inputProtocol = null;
    TProtocol outputProtocol = null;
    SocketAddress socket = null;
    try (TTransport inputTransport = inputTransportFactory_.getTransport(client_);
         TTransport outputTransport = outputTransportFactory_.getTransport(client_))
    {
        socket = ((TCustomSocket) client_).getSocket().getRemoteSocketAddress();
        ThriftSessionManager.instance.setCurrentSocket(socket);
        processor = processorFactory_.getProcessor(client_);

        inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
        outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
        // we check stopped first to make sure we're not supposed to be shutting
        // down. this is necessary for graceful shutdown.  (but not sufficient,
        // since process() can take arbitrarily long waiting for client input.
        // See comments at the end of serve().)
        while (!stopped && processor.process(inputProtocol, outputProtocol))
        {
            inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
            outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
        }
    }
    catch (TTransportException ttx)
    {
        // Assume the client died and continue silently
        // Log at debug to allow debugging of "frame too large" errors (see CASSANDRA-3142).
        logger.trace("Thrift transport error occurred during processing of message.", ttx);
    }
    catch (TException tx)
    {
        logger.error("Thrift error occurred during processing of message.", tx);
    }
    catch (Exception e)
    {
        JVMStabilityInspector.inspectThrowable(e);
        logger.error("Error occurred during processing of message.", e);
    }
    finally
    {
        if (socket != null)
            ThriftSessionManager.instance.connectionComplete(socket);

        activeClients.decrementAndGet();
    }
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:52,代码来源:CustomTThreadPoolServer.java

示例15: run

import org.apache.thrift.TProcessor; //导入方法依赖的package包/类
/**
 * Loops on processing a client forever
 */
public void run()
{
    TProcessor processor = null;
    TTransport inputTransport = null;
    TTransport outputTransport = null;
    TProtocol inputProtocol = null;
    TProtocol outputProtocol = null;
    SocketAddress socket = null;
    try
    {
        socket = ((TCustomSocket) client_).getSocket().getRemoteSocketAddress();
        ThriftSessionManager.instance.setCurrentSocket(socket);
        processor = processorFactory_.getProcessor(client_);
        inputTransport = inputTransportFactory_.getTransport(client_);
        outputTransport = outputTransportFactory_.getTransport(client_);
        inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
        outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
        // we check stopped first to make sure we're not supposed to be shutting
        // down. this is necessary for graceful shutdown.  (but not sufficient,
        // since process() can take arbitrarily long waiting for client input.
        // See comments at the end of serve().)
        while (!stopped && processor.process(inputProtocol, outputProtocol))
        {
            inputProtocol = inputProtocolFactory_.getProtocol(inputTransport);
            outputProtocol = outputProtocolFactory_.getProtocol(outputTransport);
        }
    }
    catch (TTransportException ttx)
    {
        // Assume the client died and continue silently
        // Log at debug to allow debugging of "frame too large" errors (see CASSANDRA-3142).
        logger.debug("Thrift transport error occurred during processing of message.", ttx);
    }
    catch (TException tx)
    {
        logger.error("Thrift error occurred during processing of message.", tx);
    }
    catch (Exception x)
    {
        logger.error("Error occurred during processing of message.", x);
    }
    finally
    {
        if (socket != null)
            ThriftSessionManager.instance.connectionComplete(socket);
        if (inputTransport != null)
            inputTransport.close();
        if (outputTransport != null)
            outputTransport.close();
        activeClients.decrementAndGet();
    }
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:56,代码来源:CustomTThreadPoolServer.java


注:本文中的org.apache.thrift.TProcessor.process方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。