public class AjpNio2Processor extends AbstractAjpProcessor<Nio2Channel>
AbstractAjpProcessor.SocketInputBuffer, AbstractAjpProcessor.SocketOutputBuffer
Modifier and Type | Field and Description |
---|---|
protected boolean |
flipped
Flipped flag for read buffer.
|
protected java.nio.channels.CompletionHandler<java.lang.Integer,SocketWrapper<Nio2Channel>> |
writeCompletionHandler
The completion handler used for asynchronous write operations
|
protected boolean |
writePending
Write pending flag.
|
ajpFlush, bodyBytes, bodyMessage, bytesWritten, certificates, clientCertProvider, empty, endAndCloseMessageArray, endMessageArray, endOfStream, finished, first, flushMessageArray, getBodyMessageArray, keepAliveTimeout, pongMessageArray, replay, requestHeaderMessage, requiredSecret, responseMessage, sm, tmpMB, tomcatAuthentication
adapter, asyncStateMachine, endpoint, hostNameC, request, response, socketWrapper, userDataHelper
Constructor and Description |
---|
AjpNio2Processor(int packetSize,
Nio2Endpoint endpoint0) |
Modifier and Type | Method and Description |
---|---|
protected Log |
getLog() |
protected int |
output(byte[] src,
int offset,
int length,
boolean block) |
protected boolean |
read(byte[] buf,
int pos,
int n,
boolean blockFirstRead)
Read at least the specified amount of bytes, and place them
in the input buffer.
|
void |
recycle(boolean socketClosing)
Recycle the processor, ready for the next request which may be on the
same connection or a different connection.
|
protected void |
registerForEvent(boolean read,
boolean write)
Register the socket for the specified events.
|
protected void |
resetTimeouts()
Provides a mechanism for those connector implementations (currently only
NIO) that need to reset timeouts from Async timeouts to standard HTTP
timeouts once async processing completes.
|
protected void |
setTimeout(SocketWrapper<Nio2Channel> socketWrapper,
int timeout) |
protected void |
setupSocket(SocketWrapper<Nio2Channel> socketWrapper) |
action, asyncDispatch, event, finish, flush, getAjpFlush, getClientCertProvider, getKeepAliveTimeout, getLeftoverInput, getTomcatAuthentication, getTomcatAuthorization, getUpgradeToken, isComet, isUpgrade, populateHost, prepareRequest, prepareResponse, process, readMessage, receive, refillReadBuffer, setAjpFlush, setClientCertProvider, setKeepAliveTimeout, setRequiredSecret, setSslSupport, setTomcatAuthentication, setTomcatAuthorization, upgradeDispatch
asyncPostProcess, errorDispatch, getAdapter, getEndpoint, getErrorState, getExecutor, getMaxCookieCount, getRequest, getSocketWrapper, isAsync, parseHost, resetErrorState, setAdapter, setErrorState, setMaxCookieCount, setSocketWrapper
protected java.nio.channels.CompletionHandler<java.lang.Integer,SocketWrapper<Nio2Channel>> writeCompletionHandler
protected boolean flipped
protected volatile boolean writePending
public AjpNio2Processor(int packetSize, Nio2Endpoint endpoint0)
protected Log getLog()
getLog
in class AbstractProcessor<Nio2Channel>
public void recycle(boolean socketClosing)
AbstractAjpProcessor
recycle
in interface Processor<Nio2Channel>
recycle
in class AbstractAjpProcessor<Nio2Channel>
socketClosing
- Indicates if the socket is about to be closed
allowing the processor to perform any additional
clean-up that may be requiredprotected void registerForEvent(boolean read, boolean write)
AbstractProcessor
registerForEvent
in class AbstractProcessor<Nio2Channel>
read
- Register the socket for read eventswrite
- Register the socket for write eventsprotected void resetTimeouts()
AbstractAjpProcessor
resetTimeouts
in class AbstractAjpProcessor<Nio2Channel>
protected void setupSocket(SocketWrapper<Nio2Channel> socketWrapper) throws java.io.IOException
setupSocket
in class AbstractAjpProcessor<Nio2Channel>
java.io.IOException
protected void setTimeout(SocketWrapper<Nio2Channel> socketWrapper, int timeout) throws java.io.IOException
setTimeout
in class AbstractAjpProcessor<Nio2Channel>
java.io.IOException
protected int output(byte[] src, int offset, int length, boolean block) throws java.io.IOException
output
in class AbstractAjpProcessor<Nio2Channel>
java.io.IOException
protected boolean read(byte[] buf, int pos, int n, boolean blockFirstRead) throws java.io.IOException
AbstractAjpProcessor
read
in class AbstractAjpProcessor<Nio2Channel>
buf
- Buffer to read data intopos
- Start positionn
- The minimum number of bytes to readblockFirstRead
- If there is no data available to read when this method is
called, should this call block until data becomes available?true
if the requested number of bytes were read
else false
java.io.IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.