protected long byteCount = 0;
+ /**
+ * AJP does not support comet
+ */
+ protected final boolean comet = false;
+
// ------------------------------------------------------------ Constructor
public AbstractAjpProcessor(int packetSize, AbstractEndpoint endpoint) {
}
+ @SuppressWarnings("unused")
+ public SocketState event(SocketStatus status) throws IOException {
+ // Should never reach this code but in case we do...
+ throw new IOException(
+ sm.getString("ajpprocessor.comet.notsupported"));
+ }
+
/**
* Recycle the processor, ready for the next request which may be on the
* same connection or a different connection.
processor = createProcessor();
}
+ initSsl(socket, processor);
+
SocketState state = SocketState.CLOSED;
do {
if (processor.isAsync() || state == SocketState.ASYNC_END) {
state = processor.asyncDispatch(status);
+ } else if (processor.comet) {
+ state = processor.event(status);
} else {
state = processor.process(socket);
}
if (state == SocketState.LONG) {
// In the middle of processing a request/response. Keep the
- // socket associated with the processor.
- connections.put(socket, processor);
- socket.setAsync(true);
+ // socket associated with the processor. Exact requirements
+ // depend on type of long poll
+ longPoll(socket, processor);
} else if (state == SocketState.OPEN){
// In keep-alive but between requests. OK to recycle
// processor. Continue to poll for the next request.
}
protected abstract P createProcessor();
+ @SuppressWarnings("unused")
+ protected void initSsl(SocketWrapper<S> socket, P processor) {
+ // NOOP for AJP
+ }
+ protected void longPoll(SocketWrapper<S> socket, P processor) {
+ // Same requirements for all AJP connectors
+ connections.put(socket, processor);
+ socket.setAsync(true);
+
+ }
protected abstract void release(SocketWrapper<S> socket, P processor,
boolean socketClosing, boolean addToPoller);
}
ajpprocessor.request.process=Error processing request
ajpprocessor.certs.fail=Certificate conversion failed
ajpprocessor.socket.info=Exception getting socket information
+ajpprocessor.comet.notsupported=The Comet protocol is not supported by this connector
ajpmessage.null=Cannot append null value
ajpmessage.overflow=Overflow error for buffer adding {0} bytes at position {1}