/*     */     private void handleEvent(Event paramEvent)
/*     */     {
/* 266 */       ExchangeImpl localExchangeImpl = paramEvent.exchange;
/* 267 */       HttpConnection localHttpConnection = localExchangeImpl.getConnection();
/*     */       try {
/* 269 */         if ((paramEvent instanceof WriteFinishedEvent))
/*     */         {
/* 271 */           int i = ServerImpl.this.endExchange();
/* 272 */           if ((ServerImpl.this.terminating) && (i == 0)) {
/* 273 */             ServerImpl.this.finished = true;
/*     */           }
/* 275 */           ServerImpl.this.responseCompleted(localHttpConnection);
/* 276 */           LeftOverInputStream localLeftOverInputStream = localExchangeImpl.getOriginalInputStream();
/* 277 */           if (!localLeftOverInputStream.isEOF()) {
/* 278 */             localExchangeImpl.close = true;
/*     */           }
/* 280 */           if ((localExchangeImpl.close) || (ServerImpl.this.idleConnections.size() >= ServerImpl.MAX_IDLE_CONNECTIONS)) {
/* 281 */             localHttpConnection.close();
/* 282 */             ServerImpl.this.allConnections.remove(localHttpConnection);
/*     */           }
/* 284 */           else if (localLeftOverInputStream.isDataBuffered())
/*     */           {
/* 286 */             ServerImpl.this.requestStarted(localHttpConnection);
/* 287 */             handle(localHttpConnection.getChannel(), localHttpConnection);
/*     */           } else {
/* 289 */             this.connsToRegister.add(localHttpConnection);
/*     */           }
/*     */         }
/*     */       }
/*     */       catch (IOException localIOException) {
/* 294 */         ServerImpl.this.logger.log(Level.FINER, "Dispatcher (1)", localIOException);
/*     */ 
/* 297 */         localHttpConnection.close();
/*     */       }
/*     */     }
 public void close() {
   impl.close();
 }