public void send(Object reply, boolean is_exception) { sendReply(req, req_id, reply, is_exception); }
/** Handle a request msg for this correlator */ protected void handleRequest(Message req, Header hdr) { Object retval; boolean threw_exception=false; if(log.isTraceEnabled()) log.trace("calling (%s) with request %d", request_handler != null? request_handler.getClass().getName() : "null", hdr.req_id); if(async_dispatching && request_handler != null) { Response rsp=hdr.rspExpected()? new ResponseImpl(req, hdr.req_id) : null; try { request_handler.handle(req, rsp); } catch(Throwable t) { if(rsp != null) rsp.send(wrap_exceptions ? new InvocationTargetException(t) : t, true); else log.error("%s: failed dispatching request asynchronously: %s", local_addr, t); } return; } try { retval=request_handler.handle(req); } catch(Throwable t) { threw_exception=true; retval=wrap_exceptions ? new InvocationTargetException(t) : t; } if(hdr.rspExpected()) sendReply(req, hdr.req_id, retval, threw_exception); }
public void send(Object reply, boolean is_exception) { sendReply(req, req_id, reply, is_exception); }
/** Handle a request msg for this correlator */ protected void handleRequest(Message req, Header hdr) { Object retval; boolean threw_exception=false; if(log.isTraceEnabled()) log.trace("calling (%s) with request %d", request_handler != null? request_handler.getClass().getName() : "null", hdr.req_id); if(async_dispatching && request_handler != null) { Response rsp=hdr.rspExpected()? new ResponseImpl(req, hdr.req_id) : null; try { request_handler.handle(req, rsp); } catch(Throwable t) { if(rsp != null) rsp.send(wrap_exceptions ? new InvocationTargetException(t) : t, true); else log.error("%s: failed dispatching request asynchronously: %s", local_addr, t); } return; } try { retval=request_handler.handle(req); } catch(Throwable t) { threw_exception=true; retval=wrap_exceptions ? new InvocationTargetException(t) : t; } if(hdr.rspExpected()) sendReply(req, hdr.req_id, retval, threw_exception); }