private void handleMessage(final IHttpRequest request) throws IOException {
// handler deregistering?
if (deregisterHandle) {
IBodyCompleteListener deregisterHandlerListener = new IBodyCompleteListener() {
@Execution(Execution.NONTHREADED)
public void onComplete() throws IOException {
HttpServerConnection.this.suspendMessageReceiving();
}
};
request.getNonBlockingBody().addCompleteListener(deregisterHandlerListener);
}
// InvokeOn message received?
if (requestHandlerInfo.isRequestHandlerInvokeOnMessageReceived() && request.hasBody()) {
IBodyCompleteListener messageReceivedListener = new IBodyCompleteListener() {
@Execution(Execution.NONTHREADED)
public void onComplete() throws IOException {
handle(request);
}