code:     public boolean event(org.apache.coyote.Request req, 
              org.apache.coyote.Response res, SocketStatus status) {
  
          Request request = (Request) req.getNote(ADAPTER_NOTES);
          Response response = (Response) res.getNote(ADAPTER_NOTES);
  
          if (request.getWrapper() != null) {
              
              boolean error = false;
              try {
                  if (status == SocketStatus.OPEN) {
                      request.getEvent().setEventType(CometEvent.EventType.READ);
                      request.getEvent().setEventSubType(null);
                  } else if (status == SocketStatus.DISCONNECT) {
                      request.getEvent().setEventType(CometEvent.EventType.ERROR);
                      request.getEvent().setEventSubType(CometEvent.EventSubType.CLIENT_DISCONNECT);
                      error = true;
                  } else if (status == SocketStatus.ERROR) {
                      request.getEvent().setEventType(CometEvent.EventType.ERROR);
                      request.getEvent().setEventSubType(CometEvent.EventSubType.IOEXCEPTION);
                      error = true;
                  } else if (status == SocketStatus.STOP) {
                      request.getEvent().setEventType(CometEvent.EventType.END);
                      request.getEvent().setEventSubType(CometEvent.EventSubType.SERVER_SHUTDOWN);
                  } else if (status == SocketStatus.TIMEOUT) {
                      request.getEvent().setEventType(CometEvent.EventType.ERROR);
                      request.getEvent().setEventSubType(CometEvent.EventSubType.TIMEOUT);
                  }
                  
                  // Calling the container
                  connector.getContainer().getPipeline().getFirst().event(request, response, request.getEvent());
  
                  if (response.isClosed() || !request.isComet()) {
                      res.action(ActionCode.ACTION_COMET_END, null);
                  }
                  return (!error);
              } catch (Throwable t) {
                  if (!(t instanceof IOException)) {
                      log.error(sm.getString("coyoteAdapter.service"), t);
                  }
                  error = true;
                  // FIXME: Since there's likely some structures kept in the servlet or elsewhere,
                  // a cleanup event of some sort could be needed ?
                  return false;
              } finally {
                  // Recycle the wrapper request and response
                  if (error || response.isClosed() || !request.isComet()) {
                      request.recycle();
                      request.setFilterChain(null);
                      response.recycle();
                  }
              }
              
          } else {
              return false;
          }
      }
      
  
      /**
       * Service method.
       */
  