}
return;
}
ByteBuffer dataBuffer = ByteBuffer.allocateDirect(4096);
JilterProcessor processor = new JilterProcessor(this);
try {
while (processor.process(socket, (ByteBuffer) dataBuffer.flip())) {
dataBuffer.compact();
if (this.socket.read(dataBuffer) == -1) {
logger.debug("socket reports EOF, exiting read loop");
break;
}
}
}
catch (IOException e) {
logger.debug("Unexpected exception, connection will be closed", e);
} finally {
logger.debug("closing processor");
processor.close();
logger.debug("processor closed");
try {
logger.debug("closing socket");
this.socket.close();
logger.debug("socket closed");