/* ------------------------------------------------------------ */
    protected void onResponseComplete() throws IOException {
      super.onResponseComplete();

      if (getResponseStatus() == 200) {
        _responses = parse(getResponseContent());
      }
    }
    /* ------------------------------------------------------------ */
    protected void onResponseHeader(Buffer name, Buffer value) throws IOException {
      super.onResponseHeader(name, value);
      if (HttpHeaders.CACHE.getOrdinal(name) == HttpHeaders.SET_COOKIE_ORDINAL) {
        String cname = null;
        String cvalue = null;

        QuotedStringTokenizer tok = new QuotedStringTokenizer(value.toString(), "=;", false, false);
        tok.setSingle(false);

        if (tok.hasMoreElements()) cname = tok.nextToken();
        if (tok.hasMoreElements()) cvalue = tok.nextToken();

        Cookie cookie = new Cookie(cname, cvalue);

        while (tok.hasMoreTokens()) {
          String token = tok.nextToken();
          if ("Version".equalsIgnoreCase(token))
            cookie.setVersion(Integer.parseInt(tok.nextToken()));
          else if ("Comment".equalsIgnoreCase(token)) cookie.setComment(tok.nextToken());
          else if ("Path".equalsIgnoreCase(token)) cookie.setPath(tok.nextToken());
          else if ("Domain".equalsIgnoreCase(token)) cookie.setDomain(tok.nextToken());
          else if ("Expires".equalsIgnoreCase(token)) {
            tok.nextToken();
            // TODO
          } else if ("Max-Age".equalsIgnoreCase(token)) {
            tok.nextToken();
            // TODO
          } else if ("Secure".equalsIgnoreCase(token)) cookie.setSecure(true);
        }

        BayeuxClient.this.setCookie(cookie);
      }
    }
 /* ------------------------------------------------------------ */
 protected void onConnectionFailed(Throwable ex) {
   super.onConnectionFailed(ex);
   if (++_connectFailures < 5) {
     try {
       _client.send(this);
     } catch (IOException e) {
       Log.warn(e);
     }
   }
 }
 /* ------------------------------------------------------------ */
 protected void onException(Throwable ex) {
   super.onException(ex);
 }
 /* ------------------------------------------------------------ */
 protected void onExpire() {
   super.onExpire();
 }
 /* ------------------------------------------------------------ */
 protected void onResponseStatus(Buffer version, int status, Buffer reason) throws IOException {
   super.onResponseStatus(version, status, reason);
 }