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


Java Request.setInputBuffer方法代码示例

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


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

示例1: AjpProcessor

import org.apache.coyote.Request; //导入方法依赖的package包/类
public AjpProcessor(int packetSize, JIoEndpoint endpoint) {

        this.endpoint = endpoint;

        request = new Request();
        request.setInputBuffer(new SocketInputBuffer());

        response = new Response();
        response.setHook(this);
        response.setOutputBuffer(new SocketOutputBuffer());
        request.setResponse(response);

        requestHeaderMessage = new AjpMessage(packetSize);
        responseHeaderMessage = new AjpMessage(packetSize);
        bodyMessage = new AjpMessage(packetSize);
        
        // Set the get body message buffer
        AjpMessage getBodyMessage = new AjpMessage(16);
        getBodyMessage.reset();
        getBodyMessage.appendByte(Constants.JK_AJP13_GET_BODY_CHUNK);
        getBodyMessage.appendInt(packetSize - Constants.READ_HEAD_LEN);
        getBodyMessage.end();
        getBodyMessageArray = new byte[getBodyMessage.getLen()];
        System.arraycopy(getBodyMessage.getBuffer(), 0, getBodyMessageArray, 
                0, getBodyMessage.getLen());

        // Cause loading of HexUtils
        int foo = HexUtils.DEC[0];

        // Cause loading of HttpMessages
        HttpMessages.getMessage(200);

    }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:34,代码来源:AjpProcessor.java

示例2: Http11Processor

import org.apache.coyote.Request; //导入方法依赖的package包/类
public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) {

        this.endpoint = endpoint;
        
        request = new Request();
        inputBuffer = new InternalInputBuffer(request, headerBufferSize);
        request.setInputBuffer(inputBuffer);

        response = new Response();
        response.setHook(this);
        outputBuffer = new InternalOutputBuffer(response, headerBufferSize);
        response.setOutputBuffer(outputBuffer);
        request.setResponse(response);

        initializeFilters();

        // Cause loading of HexUtils
        int foo = HexUtils.DEC[0];

        // Cause loading of FastHttpDateFormat
        FastHttpDateFormat.getCurrentDate();

    }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:24,代码来源:Http11Processor.java

示例3: AjpAprProcessor

import org.apache.coyote.Request; //导入方法依赖的package包/类
public AjpAprProcessor(int packetSize, AprEndpoint endpoint) {

        this.endpoint = endpoint;

        request = new Request();
        request.setInputBuffer(new SocketInputBuffer());

        response = new Response();
        response.setHook(this);
        response.setOutputBuffer(new SocketOutputBuffer());
        request.setResponse(response);

        requestHeaderMessage = new AjpMessage(packetSize);
        responseHeaderMessage = new AjpMessage(packetSize);
        bodyMessage = new AjpMessage(packetSize);
        
        // Allocate input and output buffers
        inputBuffer = ByteBuffer.allocateDirect(packetSize * 2);
        inputBuffer.limit(0);
        outputBuffer = ByteBuffer.allocateDirect(packetSize * 2);

        // Set the get body message buffer
        AjpMessage getBodyMessage = new AjpMessage(16);
        getBodyMessage.reset();
        getBodyMessage.appendByte(Constants.JK_AJP13_GET_BODY_CHUNK);
        getBodyMessage.appendInt(packetSize - Constants.READ_HEAD_LEN);
        getBodyMessage.end();
        getBodyMessageBuffer =
            ByteBuffer.allocateDirect(getBodyMessage.getLen());
        getBodyMessageBuffer.put(getBodyMessage.getBuffer(), 0,
                getBodyMessage.getLen());

        // Cause loading of HexUtils
        int foo = HexUtils.DEC[0];

        // Cause loading of HttpMessages
        HttpMessages.getMessage(200);

    }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:40,代码来源:AjpAprProcessor.java

示例4: process

import org.apache.coyote.Request; //导入方法依赖的package包/类
/**
 * Process specified request.
 */
public void process(Request request, ByteChunk input,
                    Response response, ByteChunk output)
    throws Exception {

    InputBuffer inputBuffer = new ByteChunkInputBuffer(input);
    OutputBuffer outputBuffer = new ByteChunkOutputBuffer(output);
    request.setInputBuffer(inputBuffer);
    response.setOutputBuffer(outputBuffer);

    adapter.service(request, response);

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:MemoryProtocolHandler.java

示例5: Http11AprProcessor

import org.apache.coyote.Request; //导入方法依赖的package包/类
public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) {

        this.endpoint = endpoint;
        
        request = new Request();
        inputBuffer = new InternalAprInputBuffer(request, headerBufferSize, endpoint);
        request.setInputBuffer(inputBuffer);

        response = new Response();
        response.setHook(this);
        outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize, endpoint);
        response.setOutputBuffer(outputBuffer);
        request.setResponse(response);
        
        ssl = endpoint.isSSLEnabled();

        initializeFilters();

        // Cause loading of HexUtils
        int foo = HexUtils.DEC[0];

        // Cause loading of FastHttpDateFormat
        FastHttpDateFormat.getCurrentDate();

    }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:26,代码来源:Http11AprProcessor.java


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