本文整理汇总了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);
}
示例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();
}
示例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);
}
示例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);
}
示例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();
}