@Override public StateConnection service() throws IOException {
  try {
    ConnectionProtocol request=requestOrCreate();
    if (request == null) {
      log.warning("Unexpected empty request: " + this);
      return StateConnection.CLOSE;
    }
    StateConnection next=request.service();
    if (next != StateConnection.CLOSE) {
      return next;
    }
 else {
      return onCloseRead();
    }
  }
 catch (  OutOfMemoryError e) {
    String msg="Out of memory in RequestProtocolHttp";
    ShutdownSystem.shutdownOutOfMemory(msg);
    log.log(Level.WARNING,e.toString(),e);
  }
catch (  Throwable e) {
    e.printStackTrace();
    log.log(Level.WARNING,e.toString(),e);
  }
  return StateConnection.CLOSE;
}

@ Override public StateConnection service ( ) throws IOException { try { ConnectionProtocol request = requestOrCreate ( ) ; if ( request == null ) { log . warning ( "Unexpected empty request: " + this ) ; return StateConnection . CLOSE ; } StateConnection next = request . service ( ) ; if ( next != StateConnection . CLOSE ) { return next ; } else { return onCloseRead ( ) ; } } catch ( OutOfMemoryError e ) { String msg = "Out of memory in RequestProtocolHttp" ; ShutdownSystem . shutdownOutOfMemory ( msg ) ; log . log ( Level . WARNING , e . toString ( ) , e ) ; } catch ( Throwable e ) { e . printStackTrace ( ) ; log . log ( Level . WARNING , e . toString ( ) , e ) ; } return StateConnection . CLOSE ; }
service a http request .
