protected Object attemptReadResponse(Connection cnx) throws Exception {
  Message msg=createResponseMessage();
  if (msg != null) {
    msg.setComms(cnx.getSocket(),cnx.getInputStream(),cnx.getOutputStream(),cnx.getCommBuffer(),cnx.getStats());
    if (msg instanceof ChunkedMessage) {
      try {
        return processResponse(msg,cnx);
      }
  finally {
        msg.unsetComms();
        processSecureBytes(cnx,msg);
      }
    }
 else {
      try {
        msg.recv();
      }
  finally {
        msg.unsetComms();
        processSecureBytes(cnx,msg);
      }
      return processResponse(msg,cnx);
    }
  }
 else {
    return null;
  }
}

protected Object attemptReadResponse ( Connection cnx ) throws Exception { Message msg = createResponseMessage ( ) ; if ( msg != null ) { msg . setComms ( cnx . getSocket ( ) , cnx . getInputStream ( ) , cnx . getOutputStream ( ) , cnx . getCommBuffer ( ) , cnx . getStats ( ) ) ; if ( msg instanceof ChunkedMessage ) { try { return processResponse ( msg , cnx ) ; } finally { msg . unsetComms ( ) ; processSecureBytes ( cnx , msg ) ; } } else { try { msg . recv ( ) ; } finally { msg . unsetComms ( ) ; processSecureBytes ( cnx , msg ) ; } return processResponse ( msg , cnx ) ; } } else { return null ; } }
attempts to read a response to this operation by reading it from the given connection , and returning it .
